UITextView with text less than 10 characters hangs iOS 9

前端 未结 4 1455
再見小時候
再見小時候 2020-12-15 23:52

Starting from iOS 9 (I used Xcode 7.0 beta 6 (7A192o)), an Objective-C app with UITextView will hang if the text view\'s text is less than 10 characters. CP

相关标签:
4条回答
  • 2020-12-16 00:11

    Took me half a day to narrow the error down to a UITextView. This has got to be the stupidest bug ever.

    You don't need to ensure that the UITextView holds at least 10 characters. Just adding a default of at least 10 characters to the UITextView in Interface Builder will fix the problem. Then, you can empty the UITextView using code.

    By the way, this is an Xcode 7 bug, not an iOS9 bug. New builds built using Xcode 7 will create the same problem in iOS7 and iOS8.

    0 讨论(0)
  • 2020-12-16 00:11

    Refer the blow. It is a bug in Xcode 7 and still has not been fixed.

    http://xcode7criticalbug.blogspot.in/2015/10/uitextview-bug-in-xcode-ios-app-getting.html

    It can overcome by programatically setting the text property for UITextView.

    0 讨论(0)
  • 2020-12-16 00:19

    i have found the solution first check the memory leak and please add the this line of code in particular class.

    -(void)viewWillAppear:(BOOL)animated {

    [super viewWillAppear:YES];

    }

    This is helpful for me my problem is resolved.

    0 讨论(0)
  • 2020-12-16 00:37

    According to the release notes of Xcode 7.1.1 this should be fixed now:

    Storyboards and nibs containing UITextView elements with between 1 and 11 characters no longer hang when loaded on iOS. (23264732)

    0 讨论(0)
提交回复
热议问题