Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios5 如何定制iAbbar IOS 5.0?_Ios5_Uitabbaritem - Fatal编程技术网

Ios5 如何定制iAbbar IOS 5.0?

Ios5 如何定制iAbbar IOS 5.0?,ios5,uitabbaritem,Ios5,Uitabbaritem,我必须自定义tabbar项目中的图像,以便在我的图标中插入图像,我该怎么做? 我从我的朋友那里听说我应该创建一个新的xib,并使用它来定制一个新的tabbar项。 这是真的吗 非常感谢 只需将下面的方法放入 appdelegate.m 文件 这可能对你有帮助 查看这些自定义选项卡项的示例在此处勾选答案可能是您的解决方案 - (void)customizeAppearance { // Costomise UITabBar // Note you can also specify “f

我必须自定义tabbar项目中的图像,以便在我的图标中插入图像,我该怎么做? 我从我的朋友那里听说我应该创建一个新的xib,并使用它来定制一个新的tabbar项。 这是真的吗


非常感谢

只需将下面的方法放入

appdelegate.m

文件

这可能对你有帮助

查看这些自定义选项卡项的示例在此处勾选答案可能是您的解决方案
- (void)customizeAppearance

{

// Costomise UITabBar   

// Note you can also specify “finished” and “unfinished” images if you wish to modify the manner in which the selected & unselected images appear.

UIImage *tabBackground = [[UIImage imageNamed:@"tab_bg"]resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 0)];

[[UITabBar appearance] setBackgroundImage:tabBackground];

[[UITabBar appearance] setSelectionIndicatorImage:[UIImage imageNamed:@"tab_select_indicator"]];

}