-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Typhoon causes crash while transferring autolayout #513
Comments
how to reproduce it? |
To reproduce this bug you should add TyphoonLoadedView into your project and run it inside iOS X environment. |
Hey @Brain89 However, I sure that crash happens in this place TyphoonViewHelpers
Might be create issue on radar? I'm think this is SDK bug. |
I do not agree that this is a SDK bug. firstItem is a readonly property (see docs)
So the code to which you refer uses private API. Apple engineers could change it without any notice. |
@Brain89 |
May be Apple engineers closed back-door that allows change readonly property with KVC😁 Thanks for reporting👌 |
We must reopen this issue. Merged PR has broken #464 |
@Brain89 but how do you think this can be fixed without using "setValue:forKey" since it crashes on iOS10 that way? |
@alexgarbarev Subclass of NSLayoutConstraint fixed this issue. If constraint is it subclass then transfer, else create new constraint. What do you think about this solution? |
So user have to choose subclass in IB while creating a constraint? For me it looks invasive. It looks like there is no legal way to modify existing constraint's first and last items.. Maybe it's better to not include support for outlets for these constraints in Typhoon, then it's more stable since uses legal APIs. |
Well, without creating NSLayoutContraint subclass inside library, every Typhoon user with constraint outlets necessity (like in #464) will have to create his own Typhoon fork, where it will be possible to fix this issue (create subclass and improve ViewHelpers in a way @CognitiveDisson wants). Seems very strange too. |
@alexgarbarev If user not use IB to TyphoonLoadedView, then he does not need set subclass. (And all be works like now) But if the user will need this functionality, it will only need to specify the subclass. |
ok, let's see solution with subclass. |
…ubclass Fixed the problem discussed in issues 513
Fixed in #524 |
Hello,
We have faced with an issue crashing our app
It appears only on devices running iOS 10 (yep, new SDK - new problems). I have attached crash log from Crashlytics.
As I understand iOS 10 SDK does not support setter for firstItem property of NSLayoutConstraint.
CrashLog.txt
The text was updated successfully, but these errors were encountered: