首页 > 其他 > 详细

IOS 7 Study - UIViewController

时间:2014-02-11 00:40:56      阅读:294      评论:0      收藏:0      [点我收藏+]

Presenting and Managing Views with UIViewController

Problem
You want to switch among different views in your application.


Solution
Use the UIViewController class.

 

(

Apple’s strategy for iOS development was to use the model-view-controller (MVC) division
of labor.

Views are what get displayed to users, while the model is the data that
the app manages, or the engine of the app.

The controller is the bridge between the model and the view.

The controller, or in this case, the view controller, manages the relationship between the view and the model.

)

 

creating a view controller without a .xib file

 

1. created an application using the Empty Application template in Xcode

2. create a new view controller for your app

     a) In Xcode, select the File menu and then choose New → New File...

     b) In the New File dialog, make sure iOS is the selected category on the left and that
           Cocoa Touch is the chosen subcategory. Once you’ve done that, select the New
           Objective-C class

bubuko.com,布布扣

 

    c) On the next screen, make sure that the “Subclass of ” the text field says UIView
         Controller. Also make sure that neither the “Targeted for iPad” nor the “With XIB
         for user interface” checkboxes is selected

bubuko.com,布布扣

IOS 7 Study - UIViewController

原文:http://www.cnblogs.com/davidgu/p/3543472.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!