Configure UITabBar

It looks like a long shot, but does anyone know a way:

  • Place the UITabBar at the top of the screen.
  • Change height

You can offer private API methods.

+4
source share
2 answers

you don't need a private API, just try this in the applicationDidFinishLaunching method.

controller = [[UITabBarController alloc] initWithNibName:nil bundle:nil]; HeadlinesViewController *headlines = [[HeadlinesViewController alloc] init]; OpinionsViewController *opinions = [[OpinionsViewController alloc] init]; controller.viewControllers = [NSArray arrayWithObjects:headlines, opinions, nil]; // set your position , width and height there controller.tabBar.frame = CGRectMake(0, 20, 320, 50); [window addSubview:controller.view ]; [window makeKeyAndVisible]; 
+5
source

I just wrote a category to change the height of the panel

you can check this is UITabBar height in iOS 5

hope this helps you :)

0
source

Source: https://habr.com/ru/post/1305876/


All Articles