How to use the Ios tab Bar

Source: Internet
Author: User

Http://blog.sina.com.cn/s/blog_63578f140100w56m.html

uitabbar* TabBar = [[Uitabbar alloc] Initwithframe:cgrectmake (40,0.0,240,30)];

[MainView Addsubview:tabbar];

[TabBar release];

Uitabbaritem *tabbaritem1 = [[Uitabbaritem alloc] initwithtitle:@ "queue number" Image:nil tag:0];

Uitabbaritem * tabBarItem2 = [[Uitabbaritem alloc] initwithtitle:@ "per capita" Image:nil tag:1];

Uitabbaritem * tabBarItem3 = [[Uitabbaritem alloc] initwithtitle:@ "Distance" Image:nil Tag:2];

Uitabbaritem * TABBARITEM4 = [[Uitabbaritem alloc] initwithtitle:@ "positive" image:nil tag:3];

Nsarray *tabbaritemarray = [[Nsarray alloc] initwithobjects:tabbaritem1, tabBarItem2, TabBarItem3, Tabbaritem4,nil];

[TabBar Setitems:tabbaritemarray];

[Tabbaritemarray release];

Like Tabbar.backgroundcolor = [Uicolor bluecolor]; Setting the background does not work

Alpha can work.

How to use the Ios tab Bar

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.