iOS UITextView
主要内容:
- 初始化的 UITextView 内部上方有一段空白
初始化的 UITextView 内部上方有一段空白
其实是因为 UIViewController 内有这么一个属性 automaticallyAdjustsScrollViewInsets
,文档解释:
A Boolean value that indicates whether the view controller should automatically adjust its scroll view insets.
所以只要在 UITextView 所在的 UIViewController 中加上这么一段:
[self setAutomaticallyAdjustsScrollViewInsets:NO];
即可。