In the actual development, when the uitextview frame equals the view frame of the current controller, and then runs, it is found that the height y value of the frame of the controller changes from position 64 of the navigation bar to 0.
The frame that causes Uitextview also moves along with it.
The essence of this problem is actually ios7view by the navigation bar occlusion problem, so after Baidu search to answer. Hereby copy the copy below to make a simple note:
Self.navigationController.navigationBar.translucent = NO;
If a split view is used on the ipad and the Uinavigationbar background image is set, the status bar is always dark
Uinavigationcontroller'll alter the height of its uinavigationbar to either-points or points, depending on a rathe R Strange and undocumented set of constraints. If The Uinavigationcontroller detects that the top of it view's frame is visually contiguous with its UIWindow ' s top, the n It draws it navigation bar with a height of up to points. If its view ' s top isn't contiguous with the UIWindow's top (even if off by only one point) then it draws it navigation Bar in the "traditional" is the same as a height of points. This logic was performed by Uinavigationcontroller even if it was several children down inside the view controller hierarchy of your application. There is no-to-prevent this behavior.
This means that the height of the Uinavigationbar will be adjusted to 44 or 64, without a definite prediction method. The previous picture as a uinavigationbar background is 44 height. Finally changed a 64 height, the above left a 20px transparent picture to fix
Netizens also have a solution
The IOS7 view has an edge-extending property: Edgesforextendedlayout,
Its default value is Uiextendededgeall.
As long as you change it to uiextendededgenone, note that there are bugs in the following versions of IOS7.
So with Uiviewcontroller's viewdidload, the following code is the perfect solution to this problem.
if ([[[[[[[] Uidevice Currentdevice] systemversion] doublevalue]>=7.0) {
Self.edgesforextendedlayout = Uirectedgenone;
Self.extendedlayoutincludesopaquebars = NO;
Self.modalpresentationcapturesstatusbarappearance = NO;
}
The Bug--ios7view of iOS development is solved by navigation bar occlusion problem