STTweetLabel
STTweetLabel copied to clipboard
Compatibility iOS9
Hi,
I downloaded the beta 4 of XCode 7 and crashes. It happens when open the view that contains this object. The issue is inside of method:
- (void)setupTextView
And the line is:
_textView = [[UITextView alloc] initWithFrame:self.bounds textContainer:_textContainer];
The error log is:
*** Assertion failure in void _UIPerformResizeOfTextViewForTextContainer(NSLayoutManager *, UIView<NSTextContainerView> *, NSTextContainer *, NSUInteger)(), /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIFoundation_Sim/UIFoundation-428/UIFoundation/TextSystem/NSLayoutManager_Private.m:1551
Regards.
I tested again with XCode 7 Beta 5 and happens the same problem.
I have a solution with this error. When calls "setupTextView", this needs to be in main threat. This happens too in the last line of "determineHotWords" -> "UpdateText".
Inside of "initWithFrame" and "initWithCoder" you must change the line:
[self setupTextView];
for
[self performSelectorOnMainThread:@selector(setupTextView) withObject:nil waitUntilDone:YES];
And, inside of "determineHotWords" you should change the line:
[self updateText];
for
[self performSelectorOnMainThread:@selector(updateText) withObject:nil waitUntilDone:YES];
And it's done. If anyone have another solution, please post here!
Thanks! :)