多张启动页图片、启动添加短视频功能,需要导入助手类文件
下载地址:https://github.com/dangxiaoyin/XZMCoreNewFeature
1、导入头文件
#import"XZMCoreNewFeatureVC.h"
#import"CALayer+Transition.h"
2、多张启动页
UIWindow *window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
self.window = window;
//判断是否需要显示:(内部已经考虑版本及本地版本缓存)
BOOLcanShow = [XZMCoreNewFeatureVC canShowNewFeature];
//测试代码,正式版本应该删除
canShow =YES;
if(canShow){//初始化新特性界面
window.rootViewController = [XZMCoreNewFeatureVC newFeatureVCWithImageNames:@[@"new1",@"new2",@"new3",@"new4"]enterBlock:^{
NSLog(@"进入主页面");
[selfenter];
} configuration:^(UIButton *enterButton) {//配置进入按钮
[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{
[selfenter];
}
[window makeKeyAndVisible];
return YES;
3、启动小视频
UIWindow*window = [[UIWindowalloc]initWithFrame:[UIScreenmainScreen].bounds];
self.window= window;
//判断是否需要显示:(内部已经考虑版本及本地版本缓存)
BOOLcanShow = [XZMCoreNewFeatureVCcanShowNewFeature];
//测试代码,正式版本应该删除
canShow =YES;
if(canShow){//初始化新特性界面
window.rootViewController= [XZMCoreNewFeatureVCnewFeatureVCWithPlayerURL:[[NSBundlemainBundle]URLForResource:@"启动视频.mp4"withExtension:nil]enterBlock:^{
NSLog(@"进入主页面");
[selfenter];
}configuration:^(AVPlayerLayer*playerLayer) {
}];
}else{
[selfenter];
}
[windowmakeKeyAndVisible];
return YES;
4、进入主页面
//进入主页面
-(void)enter{
}
摘抄链接:http://blog.sina.com.cn/s/blog_147d0371c0102w0u9.htmlhttp://blog.sina.com.cn/s/blog_147d0371c0102w0u9.html