1.Use semantic approach for font in latter projects
- Using a semantic approach to font names, such as UIFontTextStyleSubHeadline, helps avoid hard-coded font names and styles throughout your code — and ensures that your app will respond properly to user-defined typography settings as expected.
- Font descriptors help you avoid the use of hardcoded font strings to set font types and styles.
- Font descriptors are a type of descriptor language that allows you to modify fonts by applying specific attributes, or to obtain details of font metrics, without the need to instantiate an instance ofUIFont.
NS_CLASS_AVAILABLE(10_0, 7_0) @interface NSTextContainer : NSObject <NSCoding, NSTextLayoutOrientationProvider> // Default value : empty array An array of UIBezierPath representing the exclusion paths inside the receiver's bounding rect. @property(copy, NS_NONATOMIC_IOSONLY) NSArray<UIBezierPath *> *exclusionPaths NS_AVAILABLE(10_11, 7_0); @end
You might have noticed that the exclusionPaths property expects an instance of NSArray; therefore each container can support more than one exclusion path.
Class clusters are a commonly used design pattern throughout Apple’s frameworks.A class cluster is simply the Objective-C implementation of the Abstract Factory pattern, which provides a common interface for creating families of related or dependent objects without specifying the concrete classes. Familiar classes such as NSArray and NSNumber are in fact the public interface to a cluster of classes.
4.Set hight of UITextView
In any case, this is more than enough to allow the UITextView to scroll and accommodate long passages of text.