-
Notifications
You must be signed in to change notification settings - Fork 14
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
Constraint IBOutlets #6
Comments
I'm not entirely sure, but hasn't #2 already solved the problem with autolayout in the container ? |
Hi, I did face the same issue regarding "constraint IBOutlets" today. The solution provided by Codewaves works well. I forked your repository to add the code snipped together with an example view. Are you interested?? |
Maybe. Given #2, constraints should be ported to the new view. Why/when doesn't it work? |
Yes, the constraints are ported by making a hard copy! If I have a IBOutlet for a constraint (not view) defined then this outlet points to the original constraint. The suggested code above reconnects the defined outlet to the copy of the original constraint. I use IBOutlet for a constraint to modify its constant property at runtime (or design time). |
Oh, OK. I'd like a solution that doesn't use the objc runtime, will look into it tomorrow. Thanks for the sample code. |
If view class object contains autolayout constraint IBOutlets, they will be set to nil after ARC deallocs nib and initial container view. Quick fix will be something like this:
The text was updated successfully, but these errors were encountered: