求助一个问题,如何让app启动时同时加载tabbar上其他页面的数据
1个回答
展开全部
如果登陆之前所有页面不可预览的话,可以这么做
也就是你所问的登陆成功后怎么跳转tabbar
- (UITabBarController *)tabBarController
{
_tabBarController = [[UITabBarController alloc] init];
_tabBarController.viewControllers = @[NAVIGATION(BXHomeVC),
NAVIGATION(BXProductVC),
NAVIGATION(BXMineVC)];
for (int i = 0; i<_tabBarController.viewControllers.count; i++) {
((UITabBarController *) _tabBarController.viewControllers[i]).tabBarItem.title = @[@"首页",
@"产品",
@"我的"][i];
((UITabBarController *) _tabBarController.viewControllers[i]).tabBarItem.image = [[UIImage imageNamed:[NSString stringWithFormat:@"tb%d",i]] imageWithRenderingMode:UIImageRenderingModeAutomatic];
}
_tabBarController.tabBar.tintColor = MAIN_COLOR;
_tabBarController.delegate = self;
return _tabBarController;
}
BXAppDelegate *delegate = (BXAppDelegate *)[UIApplication sharedApplication].delegate;
delegate.window.rootViewController = delegate.tabBarController;
也就是你所问的登陆成功后怎么跳转tabbar
- (UITabBarController *)tabBarController
{
_tabBarController = [[UITabBarController alloc] init];
_tabBarController.viewControllers = @[NAVIGATION(BXHomeVC),
NAVIGATION(BXProductVC),
NAVIGATION(BXMineVC)];
for (int i = 0; i<_tabBarController.viewControllers.count; i++) {
((UITabBarController *) _tabBarController.viewControllers[i]).tabBarItem.title = @[@"首页",
@"产品",
@"我的"][i];
((UITabBarController *) _tabBarController.viewControllers[i]).tabBarItem.image = [[UIImage imageNamed:[NSString stringWithFormat:@"tb%d",i]] imageWithRenderingMode:UIImageRenderingModeAutomatic];
}
_tabBarController.tabBar.tintColor = MAIN_COLOR;
_tabBarController.delegate = self;
return _tabBarController;
}
BXAppDelegate *delegate = (BXAppDelegate *)[UIApplication sharedApplication].delegate;
delegate.window.rootViewController = delegate.tabBarController;
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询