0
votes

EDIT**: Although someone has decided they would like to down vote without a reason I'm going to leave this up. I noticed that in viewDidLoad of my view controller container, the content view I setup was the same size as in IB. When I later tried to load other views with my view container controller, the content view had changed it's bounds. Hope this helps anyone else that has a similar issue. The excepted answer worked. Since this is a build for iOS 6 a simple check of OS version made this an easy fix.


I have a strange issue that seems to be iOS7 related. This is an iOS6 targeted app. I have followed apples own docs about creating custom container views here. The problem I'm seeing in iOS7 is the first view I load is within the proper bounds of the content view i have defined, the other two are filling the bounds of the entire screen so it hides under the navigation bar with my segmented control. I defined the view I'm loading in a separate view controller in storyboards. Is there some sort of constraint that is working against me?

I should add that I have noticed the content view I defined in my container controller is actually changing it's size after the initial view is loaded. I'm at a loss of how to stop iOS7 from changing that UIViews frame size when it really shouldn't be changing.

Here are some screenshots. Code is pretty much the same as in the apple docs, have tried a few other ideas, defining bounds etc. but I think it has something to do with IB since the content view is changing its bounds. It appears to only be doing so in iOS7.

Loads fine for first screen

enter image description here

enter image description here

2
I had to turn down the brightness of my screen haha. Are you saying that your first screen shot is the expected behavior ? And that the next two are incorrect? (The different images you have make it kinda hard to tell what you're trying to do).Tyler
Yes first is expected other are not. Yeah I made it a little bright for testing :). I should add that the first screen shot is a view created in viewDidLoad. It appears after that, the contentView is changing it's bound so when you touch once of the other options, that view is instantiated. But of course since the bounds have changed I'm getting the above problem.Michael

2 Answers

1
votes

There is actually a proper way to fix this,

Set edgesForExtendedLayout to UIRectEdgeNone for the view under the tab bar.

Of course, I might've just looked at the pictures and assumed this was your problem...sorry if its completely unrelated..

0
votes

That's a known 'issue' in iOS 7. Since you can now have a blurred look through the UINavigationBars, UITabBars, ... This also causes issues in native apps (e.g. the Photos App) or APIs.