Declared in UITextView+BFKit.h

Overview

This category adds some useful methods to UITextView

Class Methods

initWithFrame:text:color:font:size:alignment:dataDetectorTypes:editable:selectable:returnType:keyboardType:secure:autoCapitalization:keyboardAppearance:enablesReturnKeyAutomatically:autoCorrectionType:delegate:

+ (instancetype _Nonnull)initWithFrame:(CGRect)frame text:(NSString *_Nonnull)text color:(UIColor *_Nonnull)color font:(FontName)fontName size:(float)size alignment:(NSTextAlignment)alignment dataDetectorTypes:(UIDataDetectorTypes)dataDetectorTypes editable:(BOOL)editable selectable:(BOOL)selectable returnType:(UIReturnKeyType)returnType keyboardType:(UIKeyboardType)keyboardType secure:(BOOL)secure autoCapitalization:(UITextAutocapitalizationType)capitalization keyboardAppearance:(UIKeyboardAppearance)keyboardAppearence enablesReturnKeyAutomatically:(BOOL)enablesReturnKeyAutomatically autoCorrectionType:(UITextAutocorrectionType)autoCorrectionType delegate:(id<UITextViewDelegate> _Nullable)delegate
Discussion

Create an UITextView and set some parameters

Parameters

frame

TextView’s frame

text

TextView’s text

color

TextView’s text color

fontName

TextView’s text font

size

TextView’s text size

alignment

TextView’s text alignment

dataDetectorTypes

TextView’s data detector types

editable

Set if TextView is editable

selectable

Set if TextView is selectable

returnType

TextField’s return key type

keyboardType

TextField’s keyboard type

secure

Set if the TextField is secure or not

capitalization

TextField’s text capitalization

keyboardAppearence

TextField’s keyboard appearence

enablesReturnKeyAutomatically

Set if the TextField has to automatically enables the return key

autoCorrectionType

TextField’s auto correction type

delegate

TextField’s delegate. Set nil if it has no delegate

Return Value

Returns the created UITextView

Declared In

UITextView+BFKit.h