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

  • 相关阅读:
    032 代码复用与函数递归
    031 实例7-七段数码管绘制
    030 函数的定义与使用
    029 函数和代码复用
    2.4 Buffer
    2.3 字符串链接
    2.2 去除字符串特别字符
    2.1 字符串查询
    存储数据_文件读写
    template模板
  • 原文地址:https://www.cnblogs.com/oshushu/p/5481028.html
Copyright © 2011-2022 走看看