Skip to content
This repository has been archived by the owner on Feb 7, 2020. It is now read-only.

Compatibility iOS9 #146

Open
sergisolanellas opened this issue Jul 29, 2015 · 2 comments
Open

Compatibility iOS9 #146

sergisolanellas opened this issue Jul 29, 2015 · 2 comments

Comments

@sergisolanellas
Copy link

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 *, NSTextContainer *, NSUInteger)(), /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIFoundation_Sim/UIFoundation-428/UIFoundation/TextSystem/NSLayoutManager_Private.m:1551

Regards.

@sergisolanellas
Copy link
Author

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

@sergisolanellas
Copy link
Author

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant