iphone - Gap between Navigation bar and view controller content -


I am creating a "no connection" view in the difference between viewing the navigation bar and controller contents.

I want to subclass the UINavigationViewController and move the content down a bit of view controllers.

The question is how to do it correctly?

My current solution is working, but it is quite a hack. I want to make it better. Sub-class of AGNVG controller - (zero) viewDeadapp: (BOOL) animated {[Superodewepper: animated]; Static BOOL firstTime = Yes; If (first time) {contentView = zero; (UIView * v in self.view.subviews) {if ([v isKindOfClass: [NSClassFromString (@ "UINavigationTransitionView") class]]) {contentView = v; break; }} First Time = No; OrigFrame = contentView.frame; NoConnectionView.frame = CGRectMake (0, self.navigationBar.frame.origin.y + self.navigationBar.frame.size.height, 320, 20); } [Self Adjustment Organizer: No With Animation: No]; } - (zero) adjustmentTok Connection: (BOOL) is connection with animation: (BOOL) animation {if (connection is) {[noConnectionView removeFromSuperview]; ContentView.frame = originFrame; } And {{self.view addSubview: noConnectionView]; ContentView.frame = CGRectMake (0, origFrame.origin.y + 20, 320, origFrame.size.height-20); }}

Create your UIView and set its frame Some such as (0, 0, self.view.frame.size.witdh, 40)

Use to add a view to your UIViewController .

myView.frame.size.height with vertical offset, move your elements down in your main view .

You can get all this with such questions. If you need more help, then you should be more precise about the effort you have made, and what does not work.

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -