iphone - Navigation bar and top margin -
I have a problem with a UINavigationBar and its offset, I times displayed as a supervision without the UIA controller It does not matter, however, in the scene controller where the navigation bar looks, the setup looks like this:
// Add basic view CGRK viewfreem = [[USScreen main screen] ApplicationFrame] ; UIView * myView = [[UIView alloc] initWithFrame: visibleframe]; MyView.backgroundColor = [UIColor Green Color]; Self.view = myView; [MyView release]; UINavigationBar * myBar = [[UINavigationBar alloc] initWithFrame: CGRectMake (0, 0, self.view.frame.size.width, 50)]; .... Add some stuff to the bar ... [self.view addSubview: myBar]; [Meribel Release];
As I have added the navigationbar as a shield, look at the self.view I assumed that the original. Y = 0 would mean that the bar should be displayed directly under the status bar. It expects that if I start the app on my iPad, it will rotate once (or more) and then drill under the view described above. In this case the UINA navigation bar has been displayed properly. However, if I start my app and drill directly to the controller described above (without rotating the device in front of this special controller) the navigation bar slides below 20 points below the status bar. But as soon as I rotate the device, then the bar will be fine again. I have examined the value of viewFrame.origin.y and it is 20 points in both situations, so I do not understand why in one case the bar just ignores the original. Its value of supervision but not in the other. / P>
I'm really confused about it, did anyone else have ever experienced this?
Thank you very much for your help!
I have also used it with Uiturbarb, the problem is similar.
Yes my solution is in the menuWindow for the window in the MainWW-iPad.EXIB file in the Builder Builder "Full Screen "Setting up the flag is to set the flag. Then design your ideas like 20 pixel position bar is always displayed, so in my root view, I have the toolbar which is located 20px below the top of the screen in the content view.
Comments
Post a Comment