UIWindow *window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
自分.window = ウィンドウ;
//表示するかどうかを決定します: (内部バージョンとローカル バージョン キャッシュが考慮されています)
BOOL canShow = [XZMCoreNewFeatureVC canShowNewFeature];
//テストコード、正式版は削除する必要があります
canShow = はい;
if (canShow){ // 新機能インターフェースを初期化します
window.rootViewController = [XZMCoreNewFeatureVC newFeatureVCWithImageNam es: @[ @"new1" , @"new2" , @"new3" , @"new4" ] enterBlock:^{
NSLog( @"メインページに入る" );
[自己 入力];
}configuration:^(UIButton *enterButton) { // Enter ボタンを設定します
[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 );
}];
}それ以外の場合は{
[自己 入力];
}
[ウィンドウ makeKeyAndVisible];
はいを返します。
UIWindow *window = [[ UIWindow alloc ] initWithFrame :[ UIScreen mainScreen ]。境界];
自分自身。窓 = 窓;
//表示するかどうかを決定します: (内部バージョンとローカル バージョン キャッシュが考慮されています)
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;
「自分自身」窓の レイヤー transitionWithAnimType : TransitionAnimTypeRamdom subType : TransitionSubtypesFromRa mdom カーブ: TransitionCurveRamdom 期間: 2.0f ];
}