NS_CLASS_AVAILABLE_IOS(2_0) @interface UITabBarController : UIViewController <UITabBarDelegate, NSCoding>
@property(nonatomic,copy) NSArray *viewControllers;
// If the number of view controllers is greater than the number displayable by a tab bar,
// a "More" navigation controller will automatically be shown.
// The "More" navigation controller will not be returned by -viewControllers,
// but it may be returned by -selectedViewController.
- (void)setViewControllers:(NSArray *)viewControllers animated:(BOOL)animated;
// This may return the "More" navigation controller if it exists.
//The view controller associated with the currently selected tab item
@property(nonatomic,assign) UIViewController *selectedViewController;
//The index of the view controller associated with the currently selected tab item.
@property(nonatomic) NSUInteger selectedIndex;
// Returns the "More" navigation controller, creating it if it does not already exist.
@property(nonatomic,readonly) UINavigationController *moreNavigationController;
// If non-nil, then the "More" view will include an "Edit" button that displays
// customization UI for the specified controllers. By default, all view controllers are customizable.
@property(nonatomic,copy) NSArray *customizableViewControllers;
// Provided for -[UIActionSheet showFromTabBar:].
// Attempting to modify the contents of the tab bar directly will throw an exception.
@property(nonatomic,readonly) UITabBar *tabBar NS_AVAILABLE_IOS(3_0);
@property(nonatomic,assign) id<UITabBarControllerDelegate> delegate;
@end
@protocol UITabBarControllerDelegate <NSObject>
@optional
//Asks the delegate whether the specified view controller should be made active.
- (BOOL)tabBarController:(UITabBarController *)tabBarController
shouldSelectViewController:(UIViewController *)viewController NS_AVAILABLE_IOS(3_0);
//Tells the delegate that the user selected an item in the tab bar.
- (void)tabBarController:(UITabBarController *)tabBarController
didSelectViewController:(UIViewController *)viewController;
//Tells the delegate that the tab bar customization sheet is about to be displayed.
- (void)tabBarController:(UITabBarController *)tabBarController
willBeginCustomizingViewControllers:(NSArray *)viewControllers NS_AVAILABLE_IOS(3_0);
//Tells the delegate that the tab bar customization sheet is about to be dismissed.
- (void)tabBarController:(UITabBarController *)tabBarController
willEndCustomizingViewControllers:(NSArray *)viewControllers
changed:(BOOL)changed NS_AVAILABLE_IOS(3_0);
//Tells the delegate that the tab bar customization sheet was dismissed.
- (void)tabBarController:(UITabBarController *)tabBarController
didEndCustomizingViewControllers:(NSArray *)viewControllers
changed:(BOOL)changed;
@end
@interface UIViewController (UITabBarControllerItem)
// Automatically created lazily with the view controller's title if it's not set explicitly.
@property(nonatomic,retain) UITabBarItem *tabBarItem;
// If the view controller has a tab bar controller as its ancestor, return it. Returns nil otherwise.
@property(nonatomic,readonly,retain) UITabBarController *tabBarController;
@end
UITabBarController和UITabBarControllerDelegate
最新推荐文章于 2019-06-10 13:59:43 发布
本文详细介绍了iOS中UITabBarController的使用方法及属性说明,包括如何设置和获取当前选中的视图控制器、更多导航控制器的创建与使用等。此外还探讨了自定义控制器的功能及其委托方法的作用。
ACE-Step
音乐合成
ACE-Step
ACE-Step是由中国团队阶跃星辰(StepFun)与ACE Studio联手打造的开源音乐生成模型。 它拥有3.5B参数量,支持快速高质量生成、强可控性和易于拓展的特点。 最厉害的是,它可以生成多种语言的歌曲,包括但不限于中文、英文、日文等19种语言
您可能感兴趣的与本文相关的镜像
ACE-Step
音乐合成
ACE-Step
ACE-Step是由中国团队阶跃星辰(StepFun)与ACE Studio联手打造的开源音乐生成模型。 它拥有3.5B参数量,支持快速高质量生成、强可控性和易于拓展的特点。 最厉害的是,它可以生成多种语言的歌曲,包括但不限于中文、英文、日文等19种语言
412

被折叠的 条评论
为什么被折叠?



