• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
ArgenBarbie
博客园    首页    新随笔    联系   管理    订阅  订阅
App开发

设置App图标

在Assets.xcassets的AppIcon中添加图片。

 

设置App名称

工程 -》 Info -》 添加Key:“Bundle Display Name“ 和 Value:App名称

 

设置App启动图片

在Assets.xcassets的LaunchImage中添加图片。

工程 -》 General -》 App Icons and Launch Images -》 Launch Images Source设置为LaunchImage

                                                                            -》 Launch Screen File内容删除为空

将LaunchScreen.storyboard中的Use as Launch Screen复选框取消勾选,如下图所示。

若第一次运行不能正确显示,可以把App删掉重装试一下。

 

设置启动App之后的首界面

在AppDelegate.swift中设置viewController:

    func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
        self.window = UIWindow(frame: UIScreen.mainScreen().bounds)
        self.window?.makeKeyAndVisible()
        let root = RootViewController()
        self.window?.rootViewController = root
        // Override point for customization after application launch.
        return true
    }

此时会出现"loaded 'XXXnib' but the view outlet was not set"的错误,需要关联xib。

关联xib:

在xib的File's Owner中设置Custom Class。

control键 + File's Owner,将弹出的提示框中Outlets的view关联到xib的View上。

 

文本框输入为密码形式

在xib中将文本框属性的Secure Text Entry复选框选中。

 

posted on 2016-08-27 16:55  ArgenBarbie  阅读(119)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3