IOS7 all views are moved to the top of the screen - iphone

I am just finally updating my app into IOS7. Seems like all of the XIBs now load to the very top of the screen and over write the Carrier, Time and Battery. Do I need to set something to move everything down?

This is normal if you are using iOS7. See this Fix for status bar issue in IOS 7 or this iOS 7 - Status bar overlaps the view (...problem already solved).

Related

GUI elements position in Xcode Storyboard differs from their position in the simulator

I recently worked with Xcode, especially with layout GUI elements. I read a lot of questions here about this, but it did not help me. What I have: ViewController, it lies ImageView, it lay all the other elements, I disable autolayout, screen size and in the simulator and in Xcode - the same (4 inches), but when I run I still see it:
What am I doing wrong, what is there is a way to what looks like a storyboard, and looked in the simulator (and real device) equally?
There might be two issues you are suffering with, please check following points for better understanding.
Check this with iOS 6 simulator. If its working fine then, you need to set ios 6/7 deltas for your subviews. Here is better explanation of it-- Interface Builder: What are the UIView's Layout iOS 6/7 Deltas for?
Check autoresizing masks of your subviews, definitely this is what affecting your views.
Good Luck!
Notice that in your Storyboard view, you have not displayed a status bar and that when running on the simulator, a status bar is shown. This is why all the objects are off placed. To fix this, you can either:
Hide the Status Bar - Call this method in your desired view controller:
- (BOOL)prefersStatusBarHidden {
return YES;
}
Show a simulated metric - Switch on the status bar simulated metric in your Storyboard:

Xib Size - seems to think its longer than it is

This is a bit of a strange one, but basically I am having a problem whereby the xib size of my initial view controller seems to be longer than the screen.
So, if you have an ad banner set to be on the bottom of the screen... If I run the app in simulator, it does not show on iPhone 3GS/4/4S devices, yet WILL show on the iPhone 5.
I have tried changing the xib size settings, I even created a new xib file, but the same problem is occuring which leads me to believe it is hardcoded somewhere, but I cannot think where to look for this.
It is basically like it thinks the bottom of the screen is about 30-50px more than what it actually is... Hence why the iPhone5 displays ok as it has the taller screen.
Any help would be appreciated!
Its bcoz of the StatusBar. It reserve 20px of screen . You can remove this space by do change in Status bar is initially hidden in plist and set status bar to NONE in IB.
The iPhone 5 has a taller screen. The most flexible way to lay out your xib is via AutoLayout. Here is a tutorial to get you started:
http://www.raywenderlich.com/20881/beginning-auto-layout-part-1-of-2
http://www.raywenderlich.com/20897/beginning-auto-layout-part-2-of-2
Basically, you want the ad banner to be contrained to the bottom of the view.

How to handle alignment of UI on phone call?

I am developing iPhone app for iOS 5 or above version, and making use of storyboard for UI design. My problem is when i am on phone call my UI gets misaligned because my upper status bar is taking 20 to 30 pixel of screen space.
How to handle my UI when i am on phone call?
I finally got answer for my question. Following are the things i made changes in my project and everything started working fine.
Took sliced images of all the things needed in my UI. (Initially
i was taking common image to save slicing time)
Made you of autoResizingMask property. It help me save my lots of time. Just make sure only 3 arrows top, left and right one is in ON state and your work is over.
For making everyones search easy i will add following Stackoverflow links to save your time
How to position view below green bar during phone call?
Resize for in-call status bar?
How do I detect a double-height status bar?
How to Remove Status Bar in "View Based Application" - iOS
how to hide status bar in Iphone application
How In-Call status bar impacts UIViewController's view size ? (and how to handle it properly)
iPhone Programming In Call Status Bar
resize content after iPhone status bar is shown/hidden
How to programmatically get iOS status bar height
How is the in-call status bar impacting my CGAffineTransform'd view?
View resize when In-Call Status Bar changes
Thanks to all the people who have replied to all the questions above. It made my big problem resolved.

Black tab bar turns white when exporting from Xcode to iPhone

When running my app via the iPhone Simulator / Xcode, the tab bar color is black. However, when I moved the app onto my iPhone for testing, the tab bar turned white. I looked for someone with a similar experience via Google / Stack Overflow, but I couldn't find any answers.
Any suggestions?
EDIT - My Tab Bar icons have a clear background. As i mentioned before the color is black in the simulator, but white on my phone. Do i need to color in the background of my icons?
EDIT 2 - I actually went into Interface Builder and found out that the tabbar default color was white. I still cant figure out why it showed up as black in the simulator but thanks for your help!
When running in the iPhone Simulator, you are only "simulating" the style of the device's status bar. The simulated setting for this can be found in the Interface Builder portion of Xcode 4 or in Interface Builder.app bundled with Xcode3 – look for the "Simulated Metrics" section of the Attributes inspector when you have your UIViewController selected.
Since the setting in Interface Builder only simulates the status bar style, you need to set it explicitly in your application code. This is done with the setStatusBarStyle:animated: method of the UIApplication class:
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackOpaque
animated:NO];
See the UIApplication Class Reference page for more information.

UITableView disappears when switching from portrait to landscape

hey there, I am creating an app that requires me to add tables in a particular page. The page should
be in landscape mode but the application in portrait. I've figured out the switching i.e from portrait
to landscape and back to portrait [homepage(portrait) -> tablePage (landscape)] and vice versa. The problem is the table view keeps reducing in size i.e the first time I am able to see the whole table, but when I go back to the home page and come back to the tablePage I just see half the table, it's like as if the table view gets cut off. Again I go back to the homepage and come back to the table page I don't see the table at all, i.e the whole table disappears. Please help.
I had the same problem. Everything works fine in iOS 4.3 simulator, but one single UITableview disappeared in iOS 5 in landscape mode. I solved this by simply dropping another UIView on my view and moved the UITableView into that.
Looks like a bug in iOS 5 to me. Let's hope, Apple will fix it soon.