UITextView scrollEnabled = YES not working after set scrollEnabled = NO in iOS8

后端 未结 8 875
失恋的感觉
失恋的感觉 2021-02-07 02:49

I create a demo for checking UITextView scrollEnabled. It only contains 1 UITextView and 2 button enable and disable scroll

  • I test on

相关标签:
8条回答
  • 2021-02-07 03:43

    you need to layout your views after enabling or disabling scroll view in your view.

    use viewWillLayoutSubviews/layoutIfNeeded methods.

    0 讨论(0)
  • 2021-02-07 03:44
    Please follow below steps simply
    self.myTextView.scrollEnabled = NO;
    self.myTextView.userInteractionEnabled = YES;
    self.myTextView.scrollEnabled = YES;
    
    0 讨论(0)
提交回复
热议问题