UITabBarController

UITabBarController

UITabBar

UITabBarItem


UITabBarController是UITabBar的控制器,这是一个很强大的控制器,在各大app中经常能够看见。

如上图所示的精品推荐、排行榜和探索等按钮就是一个UITabBar,它和UIToolBar很类似,都是处于屏幕的最下方,和UIToolBar不同的地方是它是系统级管理VC的,能够快速跳转到另一个分支的VC中。

1 Accessing the Tab Bar Controller Properties

/// 代理,监听相关跳转信息
weak public var delegate: UITabBarControllerDelegate?
@available(iOS 3.0, *)
/// 获取UITabBar
public var tabBar: UITabBar { get }

2 Managing the View Controllers

/// 当前管理的所有UIViewController
public var viewControllers: [UIViewController]?

/// 是否动画设置[UIViewController]
///
/// - parameter viewControllers : [UIViewController]
/// - parameter animated: Bool
///
/// - returns: void
public func setViewControllers(viewControllers: [UIViewController]?, animated: Bool)

/// 更多的导航界面
public var moreNavigationController: UINavigationController { get }
/// 更多中显示的[UIViewController]
public var customizableViewControllers: [UIViewController]?

3 Managing the Selected Tab

/// 选中的UIViewController
unowned(unsafe) public var selectedViewController: UIViewController?
/// 选中的UIViewController序号,从左到右[0,max]
public var selectedIndex: Int

 


其他

源代码

Swift

参考资料

UIKit Framework Reference

UITabBarController Class Reference

文档修改记录

时间描述
2016-01-10博文完成

版权所有

CSDN:http://blog.csdn.net/y550918116j

GitHub:https://github.com/937447974/Blog

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值