Because the status bar and view in IOS7 are overlapping, the y-coordinate of the application is not consistent with the previous one, and the setting needs to be recalculated. Basically, your app can see the problem by running it with XCODE5, and here's a simple example where a label control is added to the view on the iOS6 and IOS7 emulator.
As can be seen from the graph, the application of the y-coordinate starting point on the iOS7 is calculated from the screen vertex, and the iOS6 is calculated from the status bar, which is the root cause of all the problems.
Well, find out the problem is good to do, I would like to list the tried to see the method:
1. Modify the frame coordinates of the window
The idea is to pull windows down 20 pixel in the iOS7 system so that you can get out of the status bar and everything is back to normal.
The advantage is not to each viewcontroller to modify, generally in APPDELEGATE.M a file inside the change can. The disadvantage is the reality than the cruel, seemingly simple and convenient method always have a variety of problems, on the Internet to do all kinds of spit groove, many efforts have not been the result I also gave up to continue to delve.
2. Manually modify the coordinates
This method is the only way for college geeks who don't use xib files, and there's no problem, it's a lot of work. In addition, it is not suitable for applications that use IB to help with the UI.
3. Change the Delta value
As Apple, the introduction of iOS7 obviously can anticipate such a dilemma, it does provide you with a solution. This program is an introduction to Apple's official documentation.
First, select the IB file that needs to be adapted, and select the view as in interface Builder document as iOS 6.1 and Earlier.
This way, the various controls in IB will become iOS6, but at this point the system running on IOS7 will still be displayed with iOS7 controls, and the coordinates are still incorrect-seemingly useless. Well, this is just the first step, do not need to hurry, and then do a step to achieve the appropriate match!
Modify the value of the DeltaY, modified to what value is based on your actual situation, I am obviously here is the height of the status bar, 20 pixel.
Run the app again to see if the Viewcontroller is already well-suited?
This method is simple and intuitive, but need to be in a number of viewcontroller inside each to do the adaptation, but the overall workload is not very good, the adaptation effect is fine, rotating screen and so on no problem, so my application finally adopted this method to adapt, the actual workload is not small.