Strange top space with tab bar on iOS7 - ios7

I have a tabBarController, each viewController of the tabBarController has a webview to load web pages.
When the app start, there's an unexpected white space on top of the webview, the space's size is approximately (screen width * status bar height), the screenshot like this:
But if I click another tab, then go back to this tab, the white space is gone.
This bug is just in iOS7, Theres's no unexpected space in iOS8.
And This bug just exists in device, simulator hasn't this bug.
Please give some advice how to fix this bug.
Thank you very much.

Sounds like an issue with the webview's contentInsets. Try setting that manually in viewDidLayoutSubviews.

Related

Cannot remove white space above view in a clone of UIImagePickerControler

I'm trying to remove a white space that shows above my image picker view. I'm using this clone of UIImagePickerController. You can see in this picture:
It's the white space between the gray bar at the top of the screenshot and the images. From this thread and this one, it seems the problem is the image picker leaving space for the status bar. But none of those solutions have worked for me. My app is built with cordova so I've also tried hiding the status bar using this plugin but it didn't work. The size of the space simply increased because the statusbar was no longer present. The plugin relies on setStatusBarHidden:YES on the main UIApplication of the app, so it's similar to one of the suggestions in those other threads.
What else can I try to fix this?

iOS7 Navigation Bar Glitch On App Open and Close

I've noticed some interesting behavior with an app in iOS7. The navbar normally has the following color:
On all real devices, when the app is backgrounded or opened up, the navbar is temporarily covered with a black almost gradient mask that looks like this:
In the simulator, when the app is open and is backgrounded, I get the same black mask over it but the black is slightly shorter from top to bottom, but when it is opened up again I get the following weird white streak:
This is all temporary, and once the app finishes launching it goes away. Does anyone know what would cause this to happen?
I finally tracked down the issue to the following code in a table view controller I had:
if( IS_OS_7_OR_LATER ){
self.edgesForExtendedLayout = UIRectEdgeNone;
self.extendedLayoutIncludesOpaqueBars = YES;
}
The weird thing is, I've used this a million times to make the tableView properly sit under the navigation bar rather than just under it, so normally without this code it doesn't work right on iOS7 - but for some reason it does now. I'll have to look more into that... For some reason removing it from all my tableviews fixes the problem, but removing it from my regular view controllers fixes the navbar color problem, but makes the view's sit under the nav bar again.
I solved this issue by making sure I checked "Under Top Bars" in storyboard on the View Controller's attributes.

How do I fix empty 44px space in iOS7 view with ViewDeckController?

I am in the process of transitioning an app to iOS7. All of the views throughout the app have a 44px empty space at the bottom that appears to be for a bottom toolbar or something, but I am not trying to display a bottom toolbar. This space also exists on views that do have a bottom toolbar and the toolbar just shows directly above it.
The red space shown is actually a view behind the black view. No matter what size I set the frame of the black view to, the red space is always shown. I am also hiding the status bar in plist, so don't know if this is an artifact from that or if it has something to do with navigation bar as they are both normally 44px in height.
I have looked at the transitioning guide and haven't found anything that's worked. Any ideas to what could be causing this and how to fix?
UPDATE:
I have tried setting edgesForExtendedLayout = UIRectEdgeAll and extendedLayoutIncludesOpaqueBars = YES (also tried NO) with no effect. When I look at the subviews of the navigation controller it shows a UIToolBar as hidden, but shows it contains a frame in the exact area the view refuses to resize to even with autolayout constraints.
UPDATE 2:
This is actually a problem with ViewDeckController (https://github.com/Inferis/ViewDeck) and the way it sets it's center view bounds.
I believe it has to do with the UINavigationBar. Try toggling the following options in Storyboard and see if it solves the problem. Namely, the 'Extend Edges' options:
These options can also be set in code with the edgesForExtendedLayout and extendedLayoutIncludesOpaqueBars properties on UIViewController.
If you are transitioning to iOS 7, you should be using an Auto Layout constraint to anchor to the Bottom Layout guide. Control drag from your view to the Bottom Layout guide and choose Vertical Space from the popup menu.
Using frames in iOS 7 is harder and is the way of the past.
Auto Layout is hard to grasp at first, but it is very powerful once you get the feel.
This is actually a problem with third party library ViewDeckController (https://github.com/Inferis/ViewDeck) and the way it sets centerViewBounds for IIViewDeckControllerIntegrated. I was able to figure it out after changing to IIViewDeckControllerContained and seeing the view sized correctly.
In IIViewDeckController.m, just return self.referenceBounds for iOS7 like it does for IIViewDeckControllerContained.

Tableview not using all available space

I have an IOS application containing, amongst other view controllers, a view controller with a UIScrollView and UITableView. This is launched with
self.storyboard instantiateViewControllerWithIdentifier.
I hope this maybe something simple, but I cannot get the table view to use all its available space, i.e. the UITableView has enough height for say 4 rows, but it starts to make use of scroll bar when there is only 3 rows in the table.
Regarding the scrollview, I have some horizontal content which is only 25 in height, but if I make the UIScrollView anything less than 110 in height or so, then the horizontal content will only appear partially on screen or not at all.
Xcode 4.4.1 on OSX Lion, IOS 5.1
Any help will be appreciated.
Fixed the problem myself (Trying to find a host to put some screenshots. Will update).
I set the Bottom Bar from Inferred to Tab Bar in the Attribute Inspector and it now works. Both the previously unusable spaces in the ScrollBar and the TableView can now be used. These space were both of the size of the Tab bar. Took a while to work this out, as even before this change, the tab bar was showing on the simulator, so I didn't think it was Tab Bar related.

iPad MPMoviePlayerController full screen rotation move all views

I have a problem with rotations in full screen mode in a MPMoviePlayerController: When I rotate the iPad in full screen mode the views behind the movie player rotate too, but there isn't a status bar and all moves 20 px up.
If I show the controllers and the status bar before rotate (pushing the screen) all works fine. Instance of that, I suppose the problem is caused because there isn't status bar durning the rotation.
Someone can help me please? Thanks
Finally I resolve the problem using a MPMoviePlayerViewController instead a MPMoviePlayerController.
Durning the full screen rotation the status bar doesn't disappear and all works fine :)