PSPDFFontPickerViewController

Objective-C


@interface PSPDFFontPickerViewController
    : PSPDFPickerTableViewController <PSPDFOverridable>

Swift

class FontPickerViewController : PickerTableViewController, Overridable

Font picker that allows the user to select a font and customize the style.

  • Initialize with a list of displayed UIFontDescriptors. If fontFamilyDescriptors is nil, a default list of all commonly used font families is used.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithFontFamilyDescriptors:
        (nullable NSArray<UIFontDescriptor *> *)fontFamilyDescriptors;

    Swift

    init(fontFamilyDescriptors: [UIFontDescriptor]?)
  • All available font family names as UIFontDescriptors.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) NSArray<UIFontDescriptor *> *_Nonnull fontFamilyDescriptors;

    Swift

    var fontFamilyDescriptors: [UIFontDescriptor] { get }
  • The currently selected font.

    Declaration

    Objective-C

    @property (nonatomic, nullable) UIFont *selectedFont;

    Swift

    var selectedFont: UIFont? { get set }
  • We highlight common fonts on top to make selection easier. This must be a subset of fontFamilyDescriptors. Set this to nil to have no highlight set.

    Declaration

    Objective-C

    @property (nonatomic, nullable) NSArray<UIFontDescriptor *> *highlightedFontFamilyDescriptors;

    Swift

    var highlightedFontFamilyDescriptors: [UIFontDescriptor]? { get set }
  • Whether to allow search. Must be set before the view is loaded. Defaults to YES.

    Declaration

    Objective-C

    @property (nonatomic) BOOL searchEnabled;

    Swift

    var searchEnabled: Bool { get set }
  • Enable font downloading from Apple’s servers. Defaults to YES.

    Note

    See http://support.apple.com/kb/HT5484 for the full list.

    Declaration

    Objective-C

    @property (nonatomic) BOOL showDownloadableFonts;

    Swift

    var showDownloadableFonts: Bool { get set }
  • The font picker delegate - notifies when a font is selected.

    Declaration

    Objective-C

    @property (nonatomic, weak) id<PSPDFFontPickerViewControllerDelegate> _Nullable delegate;

    Swift

    @IBOutlet weak var delegate: FontPickerViewControllerDelegate? { get set }