tabbar的使用

简景焕
2023-12-01

//************//AppDelegate.m

    // 整体是一个UITabBarController,每个界面都是一个UIVdiewController

    _tabbarViewController = [[TabbarViewController alloc] init];

     // 这里是不同之处是,根界面UITabBarController

    self.window.rootViewController =_tabbarViewController;


//************//TabbarViewController.m

//@interface TabbarViewController : GXViewController


- (void)viewDidLoad

{

    [superviewDidLoad];

    RootViewController *rootViewController = [[RootViewControlleralloc] init];

    TrendViewController *trendViewController = [[TrendViewControlleralloc] init];

    MoreViewController *moreViewController = [[MoreViewControlleralloc] init];

    LifeViewController *lifeViewController = [[LifeViewControlleralloc] init];

    

    self.viewControllers = [NSArrayarrayWithObjects:rootViewController,trendViewController,lifeViewController,moreViewController,nil];

}

//************//GXViewController 

//自定义tabbar 和button,可以去下载代码,可以直接用哦,哈哈哈

http://download.csdn.net/detail/muzeng/8031263


 类似资料: