-
Notifications
You must be signed in to change notification settings - Fork 5
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
Create constraints for top layout guide and bottom layout guide #2
Comments
Good call! |
@yoiang — thanks for the response. Yes, the solution will need a little thinking and experimentation to get right. I found http://stackoverflow.com/a/26397943/590767, which is a hack on If it was a switch that could be activated through user-defined attributes that'd be even better, RBStoryboardLink style. I don't think RBStoryboardLink's implementation works either, though! |
Heya @yoiang — thought I wrote a message but it's just disappeared! Yep the stutter has been fixed. With respect I'm not so sure about the implementation though. Top layout guides and bottom layout guides in iOS 7 generalises the concept of top and bottom bars showing up (navigation bars, toolbars, tab bars, mainly) and whether the view's frame should change to avoid being obscured. I reckon that would be cleaner than performing custom checks like Plus — if you look carefully at the push segue animation, the view actually jumps back to its original position (see below). I'm positive this doesn't happen when using the top layout guide. See SnapKit/Masonry#27. |
@fatuhoku ah you're right, for some reason when I tested last night with the topLayoutGuide it wasn't ready in time and was causing more shifting but now it seems to be alright with cleaned up code. I'll clean up the code and push with top and bottom layout guides. |
@fatuhoku Alright, now if it looks good I'll merge into master, thanks for pushing to get this working nice and cleanly :) |
K, I'm going to merge this in and push it! |
StoryboardXibController 1.7 pushed to Cocoapods |
Sorry I haven't had time to check it. I trust that it's all good though =] |
Views created in XIB doesn't know whether it will be presented under a
UINavigationController
or not, so when designing the view with IB, it's not possible to create view constraints attached to the top or bottom layout guides, forcing the user to bind to the edges of the superview.When the XIB is loaded by StoryboardXibController, these views are oblivious to the top and bottom layout guides and so the contents are drawn underneath the navigation bars when they're not supposed to.
The text was updated successfully, but these errors were encountered: