zoukankan      html  css  js  c++  java
  • 不用storyboard,用xib开发

    1. 新建一个Single View Application项目, 删除自动生成的.storyboard文件和ViewController文件

    2. 新建一个UIViewController的子类,命名为ViewController,生成的对应文件为ViewController.h, ViewController.m及ViewController.xib

    3. 确认工程TAGETS中的Main interface为空

    4. 打开AppDelegate.m文件,添加头文件#import "ViewController.h",在application:didFinishingLaunchingWithOptions:函数添加如下代码:

        self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
        ViewController *myViewController = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil];
        self.window.rootViewController = myViewController;
        [self.window makeKeyAndVisible];
  • 相关阅读:
    JS函数式编程【译】前言
    11.15周总结
    11.13
    11.12
    11.11
    11.10
    11.9
    11.8周总结
    11.6
    11.5
  • 原文地址:https://www.cnblogs.com/liuliuliu/p/4383459.html
Copyright © 2011-2022 走看看