Open davidtperk opened 9 years ago
@dtp5 were you able to get the original code working correctly? I just grabbed a fresh copy of master, added 3 view controllers to the storyboard and placed in ne Storyboard IDs to each view controller and then used the same three lines that you had, and it worked correctly for me.
Yeah I added view controllers to your project and it ran fine. Only in my project are the sizes distorted. I've tried everything. One thing I'm thinking about is that I have an iPhone 6, and your project doesn't have native resolution on my phone. My project has native resolution, but the sizes are all off. Could that be it?
I've even copy+pasted view controllers from your project into mine and had the same problems.
UPDATE: So I tried the view controller method from within your project, and it worked fine, although without native resolution. I built a brand new project, copy+pasted everything in the new project, and was faced with the same issues. So, what's different about your project?
I've been having the same issue, try as I might, the Views won't go edge to edge (5 fine, 6 has a gap) but the original Repo does this fine - it's so strange! I've been hunting for strange settings in the plist and all sorts.
@lbrendanl I did the same above and was having the same issue at first. Resolve the issue by removing the "auto size classes" and by making sure that all my labels and items on the view controller had appropriate constraints.
I'm having the exact same issue as the initial post. Has a solution been found? It's driving me nuts. It's copy paste identical!
PS: Thanks for the awesome repo despite the issue :)
Was there any solution to this problem? I'm facing the same issue.
Hey Brendan, thanks for the repo. Your code works perfectly with .xibs, but when I try to substitute view controllers for .xibs, the sizes are all thrown off. The only code I changed was:
This:
var AVc :AViewController = AViewController(nibName: "AViewController", bundle: nil); var BVc :BViewController = BViewController(nibName: "BViewController", bundle: nil); var CVc :CViewController = CViewController(nibName: "CViewController", bundle: nil);
To this:
var AVc = storyboard!.instantiateViewControllerWithIdentifier("VC1") as! UIViewController var BVc = storyboard!.instantiateViewControllerWithIdentifier("VC2") as! UIViewController var CVc = storyboard!.instantiateViewControllerWithIdentifier("VC3") as! UIViewController