切换长辈版代码如下:
LargeTabbarViewController *largeTabBar = [[LargeTabbarViewController alloc] init];
CATransition *transtition = [CATransition animation];
transtition.duration = 1.0;
transtition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut];
transtition.type = @"oglFlip";
transtition.subtype = @"fromRight";
[[UIApplication sharedApplication].delegate window].rootViewController = largeTabBar;
[largeTabBar setSelectedIndex:1];
[[[UIApplication sharedApplication].delegate window].layer addAnimation:transtition forKey:@"animation"];
[BXStoreLocalTool isLargeCharacterVersion:YES];
[SVProgressHUD setFont:[UIFont systemFontOfSize:24]];
return;
切换正常版代码如下:
MainTabViewController *mainTabBar = [[MainTabViewController alloc] init];
CATransition *transtition = [CATransition animation];
transtition.duration = 1.0;
transtition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut];
transtition.type = @"oglFlip";
transtition.subtype = @"fromRight";
[[UIApplication sharedApplication].delegate window].rootViewController = mainTabBar;
[mainTabBar setSelectedIndex:3];
[[[UIApplication sharedApplication].delegate window].layer addAnimation:transtition forKey:@"animation"];
[BXStoreLocalTool isLargeCharacterVersion:NO];
[SVProgressHUD setFont:[UIFont preferredFontForTextStyle:UIFontTextStyleSubheadline]];
return;