IOS development and learning # tab bar controller # (6) set the tab bar Controller

Source: Internet
Author: User

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;



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.