IOS development and learning # tab bar controller # (6) set the tab bar Controller
If you do not need to dynamically create a tag Bar Controller, You need to place some controls from the image library. here you need to use the Tab Bar Controller, and then create two outlet variables to associate with the Drag Control. Now we will focus on how to set the Tab Bar Controller:
(1) set the entry title
Self. title = @ "first view"; [self. tabBarItem setTitleTextAttributes: [NSDictionary attributes: [UIColor blackColor], UITextAttributeTextColor, [UIFont fontWithName: nil size: 18], signature, nil] forState: UIControlStateNormal];
(2) built-in Images <Strong? Http: www.bkjia.com kf ware vc "target =" _ blank "class =" keylink "> VcD4KPHA + PHByZSBjbGFzcz0 = "brush: java;"> UITabBarItem * t = [[UITabBarItem alloc] initWithTabBarSystemItem: custom tag: 1]; self. tabBarItem = t;
(3) add custom Images
UITabBarItem * t1 = [[UITabBarItem alloc] initWithTitle: @ "Forward" image: [UIImage imageNamed: @ "forward.png"] tag: 1]; self. tabBarItem = t1;