UIView in unexpectedly going under the status bar
I'm working on my iPhone application and I have a really weird behavior with the status bar and the window.
In the beginning my view appears to be slightly under the 开发者_如何学运维status bar (my view's height is 480) as i want it to.
But after i use the Movie player in another view and i transition the app to the first view its no longer slightly under it goes down 20px and starting when the status bar finishes cause the lower 20px's of my screen to be hidden.
I dont know what causing this behavior and i really wanna control it. Can some one please advise ? Thanks in advance.
well the error is caused due to the fact that the status bar is 20px in height and the height of the iphone screen is 480px. and so if you create an app that has 480px height with the status bar on top of it than this kind of mess is ought to happen. so my advise is that either you make your view 460px height or hide the status bar if 20px are that important to you. If you want to hide the status bar then in info.plist add another variable called "status bar initially hidden" and click on the check box its at the end of the list.
精彩评论