UIWindow *window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
self.window = window;
// Judge whether it needs to be displayed: (internal version and local version cache have been considered)
BOOL canShow = [XZMCoreNewFeatureVC canShowNewFeature];
// Test code, the official version should be deleted
canShow = YES;
if (canShow){ // Initialize the new feature interface
window.rootViewController = [XZMCoreNewFeatureVC newFeatureVCWithImageNames:@[@"new1",@"new2",@"new3",@"new4"] enterBlock:^{
NSLog( @" Enter the main page " );
[self enter];
} configuration:^(UIButton *enterButton) { // Configure the enter button
[enterButton setBackgroundImage:[UIImage imageNamed:@"btn_nor"] forState:UIControlStateNormal];
[enterButton setBackgroundImage:[UIImage imageNamed:@"btn_pressed"] forState:UIControlStateHighlighted];
enterButton.bounds = CGRectMake(0, 0, 120, 40);
enterButton.center = CGPointMake(KScreenW * 0.5, KScreenH* 0.85);
}];
}else{
[self enter];
}
[window makeKeyAndVisible];
return YES;
UIWindow *window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
self.window = window;
// Judge whether it needs to be displayed: (internal version and local version cache have been considered)
BOOL canShow = [XZMCoreNewFeatureVC canShowNewFeature];
//测试代码,正式版本应该删除
canShow = YES;
if(canShow){ // 初始化新特性界面
window.rootViewController = [XZMCoreNewFeatureVC newFeatureVCWithPlayerURL:[[NSBundlemainBundle] URLForResource:@"启动视频.mp4" withExtension:nil] enterBlock:^{
NSLog(@"进入主页面");
[self enter];
} configuration:^(AVPlayerLayer *playerLayer) {
}];
}else{
[self enter];
}
[window makeKeyAndVisible];
return YES;
// 进入主页面
-(void)enter{
UIViewController *vc = [[UIViewController alloc] init];
vc.view.backgroundColor = [UIColor brownColor];
self.window.rootViewController = vc;
[self.window.layer transitionWithAnimType:TransitionAnimTypeRamdomsubType:TransitionSubtypesFromRamdom curve:TransitionCurveRamdom duration:2.0f];
}