iOS 删除stroryboard
2016-04-01 16:15
561 查看
Xcode移除”main.storyboard”以及”LaunchScreen.storyboard”
1、删除项目中的“main.storyboard”、“LaunchScreen.storyboard”的两个文件
2、移除“info.plist”文件中的“Launch screen interface file base name”和“Main storyboard file base name”两个节点
3、编辑“AppDelegate.m”文件中“didFinishLaunchingWithOptions”
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; YourViewController *yourVC = [[YourViewController alloc] init]; UINavigationController *loginNav = [[UINavigationController alloc] yourVC]; self.window.rootViewController = loginNav; [self.window makeKeyAndVisible]; return YES; }
补充:
删除完“main.storyboard”、“LaunchScreen.storyboard”的两个文件之后可能出出现屏幕上下有黑边的情况,出现这种情况有一下两种解决办法
第一种:只删除“main.storyboard”文件,保留“LaunchScreen.storyboard”
第二种:在“Assets.xcassets”中添加“LaunchImage”(如果之前有的话,则不用添加),然后在“LaunchImage”加入对应的图片:
iPhone 4s (retina @2x) 640 x 960iPhone 5 (@2x): 640 x 1136
iPhone 6 (@2x): 750 x 1334
iPhone 6 Plus (@3x): 1242 x 2208
相关文章推荐
- iOS开发学习之 - 高度自适应之计算文字高度
- ios 二维码、条形码扫描
- IOS各种开发者帐号和发布类型
- iOS开发延迟执行一个方法的方法
- iOS Xib尺寸适配屏幕尺寸
- ios 更新约束
- iOS跳转到系统设置(如:定位、音乐、墙纸设置、蓝牙等)
- 使用Vitamio开发iOS平台上的万能播放器
- ios AutoLayout笔记
- 使用NavigationController的一个小技巧
- GitHub 上 iOS 开源库 Top 100
- IOS把url中含有的中文字符转化为UTF8编码方法
- ios NSString 去除首尾和中间空格(亲测可用)
- iOS 类别和扩展(Categories和Extensions)
- iOS 导出 ipa 包时 四个选项的意义
- IOS-使用AVAudioPlayer播放音乐文件无声音
- iOS注册验证
- iOS开发workspace和多个target
- iOS开发系列--音频播放、录音、视频播放、拍照、视频录制
- IOS 委托和协议区别和联系