另寻他路:UITabBar与UINavagationBar一样,系统自身会带有控制器,如果直接利用这些控制器UITabBarController的话,会非常方便定义跟视图控制器:
#import <UIKit/UIKit.h>
#import "DatePicker.h"
#import "SinglePicker.h"
#import "DoublePicker.h"
#import "RelyPicker.h"
@interface ViewController : UIViewController
<UITabBarControllerDelegate]]>
{
UITabBarController *tabBarController;
DatePicker *datePicker;
SinglePicker *singlePicker;
DoublePicker *doublePicker;
RelyPicker *relyPicker;
}
@end