Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/extensions/Variables/includes/ExtVariables.php on line 198
UIFontChooser - iPhone Development Wiki


From iPhone Development Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

UIFontChooser is a view that can choose a font family. It is very primitive, and it is better to implement a custom UIPickerView instead.

Methods of UIFontChooser


Signature +(UIFontChooser*)sharedFontChooser;
Available in 2.0 – 3.2

Create a font chooser view. It will be initialized to have a frame equal to the main screen size.


Signature -(NSString*)selectedFamilyName;
Available in 2.0 – 3.2

Returns the selected font family name, or nil if none are selected.


Signature -(CGFloat)selectedSize;
Available in 2.0 – 3.2

Returns the selected font size, or 0 if the size field is left empty.


Signature @property(assign,nonatomic) id delegate;
Available in 2.0 – 3.2

Give the font chooser a delegate to respond to. It must conform to the informal protocol:

@protocol UIFontChooserDelegate

Note: If you implement -showKeyboardForFontChooser:, you must implement -hideKeyboardForFontChooser: as well.