I added a subview to my current UINavigationController, but I found that there is a white gap between my subview and top view about 10-20 pixel. I’m not intended to do that, and it’s ugly.
After check each views’ frame, I found that the sub view is inited with the method initWithFrame:[[UIScreen mainScreen] applicationFrame]; and UIScreen.applicationFrame.origin.y is 20, other than 0. From apple’s document, it’s said:
This property contains the screen bounds minus the area occupied by the status bar, if it is visible. Using this property is the recommended way to retrieve your application’s initial window size. The rectangle is specified in points.
but I don’t think that’s the reason of why y is 20. status bar should be at the bottom, right? anyway I changed to use [[UIScreen mainScreen] bounds], but please not that UIScreen.bounds is (0, 0, 320, 480), the height(480) may be wrong, it’s OK right now in my application.
Thursday, July 1, 2010
Subscribe to:
Posts (Atom)