问题描述
我想在iOS中以编程方式添加UITabBarItem。
I want to add UITabBarItem in programmatically in iOS.
在界面生成器中,我们可以轻松选择标识符搜索,收藏夹,最近选项卡等。
In interface Builder,we can easily choose with Identifier for Search,Favourites,Recent Tabs,etc..
我想知道如何以编程方式添加这些标识符类型?
I would like to know how can i add these Identifier type in programatically?
推荐答案
您将其添加为UIViewController的属性?
你创建一个 UITabBarItem
You add it as a UIViewController's property?You create a UITabBarItem
UITabBarItem * localTabBarItem = [[UITabBarItem alloc ]
initWithTitle:@日期图片:clockIcon标签:0];
然后设置UIViewController的属性
And then set UIViewController's property
[viewController setTabBarItem:localTabBarItem];
这是一大包TabBar图像
Here is a huge pack of TabBar images http://www.axialis.com/objects/ip_icon_09.shtml
这篇关于如何以编程方式在iOS中添加UITabBarItem的标识符类型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!