如何在iOS 6的UITabBarController的“更多"按钮上添加图像? [英] How to add Image On 'more' Button of UITabBarController in iOS 6?

查看:54
本文介绍了如何在iOS 6的UITabBarController的“更多"按钮上添加图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经知道如何添加UITabBarController及其用法,

I know how to add UITabBarController and how it is used, I already done it.

我的问题是我无法在UITabBarController'more'选项卡上添加图像.
我知道我有很多类似的问题,但并没有帮助我.
谷歌搜索之后,我发现我们无法在UITabBarController'More'选项卡上添加图像,因为当UITabBarItem大于5时,more选项卡将由UITabBarController自动显示. > 我可以找到如何更改选择颜色和标题 'more'按钮的方法,但是我找不到关于'more'按钮图像的信息.

My Problem is that I am not able to add image on 'more' tab of UITabBarController.
I know there are many similar questions as mine but did not help me.
After googling I found that we can't add images on 'More' tab in UITabBarController Because more tab is automatically displayed by UITabBarController when UITabBarItem is more Then 5.
I could find how to change SELECTION COLOR AND TITLE OF 'more' button, But I could not find about 'more' button Image.

所以我可能需要自定义UITabBarController,所以,我也在搜索UITabBarController的自定义,但找不到它.

So may be I need to customize UITabBarController so, I am also searching for customization of UITabBarController but could not find it.

请在此问题上帮助我.

推荐答案

当iPhone中的选项卡超过5个时,会自动生成更多按钮.所以你不能那样做.相反,您应该在UIViewUIButton s的帮助下制作一个自定义选项卡.

More button is automatically generate when tabs are more than 5 in iPhone. So you can't do that. Instead you should make a custom tabbar with the help of UIView and UIButtons.

查看如何在self.view上添加UIViewController的视图.

See how to add UIViewController's view on self.view.

[self addChildViewController:yourViewController];
yourViewController.view.frame = anyFrame;
[self addSubview:yourViewController.view];
[yourViewController didMoveToParentViewController:self];

这样,您可以在每个按钮的单击上添加不同的UIViewController.一切顺利! 

By this you can add different UIViewController on each button's click. All the best! 

好吧,如果您不想自己创建它.以下是自定义标签栏的列表,找到了适合您需求的标签栏.

Well If you dont want to create it yourself. Below is the list of custom tabbars find the one which suits your requirement.

  1. AKTabBarController
  2. InfiniTabBar
  3. RaisedCenterTabBar
  4. MHTabBarController
  5. TweetBotTabBar
  6. ALCustomTabBarController
  7. MHCustomTabBarController
  8. M13InfiniteTabBar
  9. TabBarKit
  10. RNSwipeBar
  11. BCTabBarController
  12. TabBarAnimation
  13. ExpandableTabBar
  14. JBTabBarController
  15. JSScrollableTabBar
  16. NGTabBarController
  17. crtabbar
  18. VSTabBar
  19. DMFilterView
  20. CubeTabBarController
  21. FSVerticalTabBarController
  22. PrettyKit
  1. AKTabBarController
  2. InfiniTabBar
  3. RaisedCenterTabBar
  4. MHTabBarController
  5. TweetBotTabBar
  6. ALCustomTabBarController
  7. MHCustomTabBarController
  8. M13InfiniteTabBar
  9. TabBarKit
  10. RNSwipeBar
  11. BCTabBarController
  12. TabBarAnimation
  13. ExpandableTabBar
  14. JBTabBarController
  15. JSScrollableTabBar
  16. NGTabBarController
  17. crtabbar
  18. VSTabBar
  19. DMFilterView
  20. CubeTabBarController
  21. FSVerticalTabBarController
  22. PrettyKit

这篇关于如何在iOS 6的UITabBarController的“更多"按钮上添加图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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