iOS app 长辈版和正常版切换

切换长辈版代码如下:

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;
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容