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

后端 未结 8 876
失恋的感觉
失恋的感觉 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:31

    I tried my code and it worked properly

    IBOutlet UITextView *tv;
    
    //---------Enable button action.
    
    -(IBAction)enable:(id)sender
    {
        tv.scrollEnabled=YES;
    }
    
    //---------Disable button action.
    
    -(IBAction)disable:(id)sender
    {
        tv.scrollEnabled=NO;
    }
    

    try your code once more in device.

提交回复
热议问题