自定义TabBar上的突出显示图像 [英] Customize Highlight Image on TabBar

查看:82
本文介绍了自定义TabBar上的突出显示图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用标签栏上的图像替换普通的高光。

I want to replace the normal highlight with an image on tabbar.

在iOS4和iOS5上最简单的方法是什么?

What is the simplest way to do this on iOS4 and iOS5??

推荐答案

在iOS 5中这非常容易(请参见< a href = http://developer.apple.com/library/ios/documentation/UIKit/Reference/UITabBar_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40007521-CH3-SW4 rel = nofollow noreferrer> Apple的UITabBar文档的自定义外观部分)。

This is super easy in iOS 5 (see the "Customizing Appearance" section of Apple's UITabBar documentation).

如果您的客户坚持使用iOS 4,则必须有点更有创意。考虑子类化 UITabBar UITabBarController 并自己绘制一些。 下面是一个示例和另一个示例另一个示例,其中的答案指向名为 BCTabBarController )。所有适合您的潜在解决方案。

If your client is insisting on iOS 4, you'll have to be a bit more creative. Consider subclassing UITabBar or UITabBarController and doing some drawing of your own. Here is an example (and another example and another example which has an answer which points to something called BCTabBarController) you can look at. All great potential solutions for you.

这篇关于自定义TabBar上的突出显示图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆