做出来IOS app第一次使用出来的指导介绍效果
2016-01-26 16:02
295 查看
在AppDelegate里面的入口类方法
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
里面添加代码
if (![[NSUserDefaults standardUserDefaults] boolForKey:@"everLaunched"]) {
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"firstLaunch"];
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"everLaunched"];
//此处写你第一次使用时要用到的指引界面(controller)
NewGuideVC * new = [[NewGuideVC alloc]init];//指导界面
self.window = [[UIWindow alloc]initWithFrame:[UIScreen mainScreen].bounds];
self.window.backgroundColor = [UIColor whiteColor];
UINavigationController *nav = [[UINavigationController alloc]initWithRootViewController:new];
nav.navigationBarHidden = YES;
self.window.rootViewController = nav;
[self.window makeKeyAndVisible];
}else
{
//跳转到你的首页或登录注册界面的代码
}
接下来在指导页的ViewController里操作指导动画,完成后添加跳到首页或者登录界面,并把指导页移除
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
里面添加代码
if (![[NSUserDefaults standardUserDefaults] boolForKey:@"everLaunched"]) {
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"firstLaunch"];
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"everLaunched"];
//此处写你第一次使用时要用到的指引界面(controller)
NewGuideVC * new = [[NewGuideVC alloc]init];//指导界面
self.window = [[UIWindow alloc]initWithFrame:[UIScreen mainScreen].bounds];
self.window.backgroundColor = [UIColor whiteColor];
UINavigationController *nav = [[UINavigationController alloc]initWithRootViewController:new];
nav.navigationBarHidden = YES;
self.window.rootViewController = nav;
[self.window makeKeyAndVisible];
}else
{
//跳转到你的首页或登录注册界面的代码
}
接下来在指导页的ViewController里操作指导动画,完成后添加跳到首页或者登录界面,并把指导页移除
相关文章推荐
- Android 之 图片变换
- Android仿微信群聊头像
- iOS block反向传值
- APP开发之UINavigationController设置
- 微信编辑器新手入门必读
- Android国际化
- iOS黑魔法-Method Swizzling
- 高手博客汇总
- Android Paint drawText使用完全解读
- unity3d两种播放视频的方式
- iOS - 监听键盘删除键之非代理实现
- [解析苹果官方文档]之[自动布局-view.autoresizingMask]
- Android开源项目第二篇——工具库篇
- Android自学之SharedPreferences存储实现记录密码功能
- android常用的一些命令,备份避免遗失
- 猫猫学Swift之Playground初次感受
- 超好看的下拉刷新动画Android代码实现
- Android 仿秒拍,微信录制短视频
- android之调用摄像头
- Android Studio 和 Gradle 构建基础