`
prevention
  • 浏览: 70126 次
社区版块
存档分类
最新评论

大锐哥的iOS开发教程(3)用代码实现HelloWorld工程

阅读更多

iOS Dev (3) HelloWorld with codes

  • 作者:爱欧艾斯鸟

删除

  • 删除 HelloWorldViewController.xib文件
  • 删除 HelloWorldViewController.m 中的 viewDidLoad

添加

  • 添加 loadView 到 HelloWorldViewController.m
      - (void)loadView
  •   {
  •       UIView *view =
  •           [[UIView alloc] initWithFrame: [UIScreen mainScreen].applicationFrame];
  •       self.view = view;
  •       UILabel *label2 = [[UILabel alloc] initWithFrame: CGRectMake(0, 110, 150, 100)];
  •       label2.text = @"Hello World 2";
  •       [self.view addSubview: label2];
  •       [label2 release];
  •   }
  • UIScreenUIKit.framework component;
  • UILabelUIKit.framework component;
  • CGRectMakeCoreGraphics.framework component;

Run it!

(THE END)

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics