使用textview的时候,会发生光标偏移的情况,其实是因为iOS7里导航栏,状态栏等有个边缘延伸的效果在。

把边缘延伸关掉就好了。代码如下

//取消iOS7的边缘延伸效果(例如导航栏,状态栏等等)
self.modalPresentationCapturesStatusBarAppearance = NO;
self.edgesForExtendedLayout = UIRectEdgeNone;
self.extendedLayoutIncludesOpaqueBars = NO;

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-09-21
  • 2022-12-23
  • 2021-10-27
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案