STTweetLabel icon indicating copy to clipboard operation
STTweetLabel copied to clipboard

Compatibility iOS9

Open sergisolanellas opened this issue 9 years ago • 2 comments

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.

sergisolanellas avatar Jul 29 '15 19:07 sergisolanellas

I tested again with XCode 7 Beta 5 and happens the same problem.

sergisolanellas avatar Aug 06 '15 20:08 sergisolanellas

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! :)

sergisolanellas avatar Sep 07 '15 21:09 sergisolanellas