zoukankan      html  css  js  c++  java
  • iOS新建项目基本配置

    项目整体同xib+代码的方式

    1.调整项目文件结构

    2.将资源图片导入工程

    •   General->LaunchScreen 修改

    3.App名称修改

      info->Bundle name

    4.删除StoryBoard 并修改 General->Main Interface删除

    5.为App创建窗口

      AppDelegate.h

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
        // 创建窗口
        self.window = [[UIWindow alloc] init];
        self.window.frame = [UIScreen mainScreen].bounds;
        
        // 设置窗口的根控制器
        self.window.rootViewController = [[XMGTabBarController alloc] init];
        
        // 显示窗口
        [self.window makeKeyAndVisible];
        
        // 显示推送引导
        [XMGPushGuideView show];
        return YES;
    }
    

    6.项目头文件,整个项目的头文件PCH文件的建立

    • new File->other -> PCH file(文件名默认) 
    • Build Seetting - > 搜过Prefix Header ->输入PCH文件的路径(项目文件夹名称/Classes/Other/PrefixHeader.pch)

    7.修改plist 让iOS9可以发送http协议的请求

    1. )在Info.plist中添加NSAppTransportSecurity类型Dictionary

    2. )在NSAppTransportSecurity下添加NSAllowsArbitraryLoads类型Boolean,值设为YES

  • 相关阅读:
    apache+tomcat分布式搭建
    maven 加入本地jar包
    一步一步搭建Jenkins环境
    缓存详解
    nginx配置文件注释
    mybatis like的用法
    Golang聊天室
    windows 10安装gensim、nltk
    理解矩阵乘法
    超赞的 Go 语言 INI 文件操作
  • 原文地址:https://www.cnblogs.com/oshushu/p/5481028.html
Copyright © 2011-2022 走看看