neraliu's blog internet profession in between hongkong/china and silicon valley (no longer, but the world!)

17月/100

the key design pattern of the iphone app

286月/100

understand more about the UIViewController




when you build the application by using the interface builder, you will find that everything is linked up by default. when your application is being loaded up (in the function of didFinishLaunchingWithOptions) and you will find that the rootviewcontroller is created already.

226月/100

trying to unlink the window with the app delegate




the finding is - the window object in the didFinishLaunchingWithOptions is pointing to nil, if you link it up, the window is not nil anymore.

226月/100

if we are not using the IB to set the view




in this case, we simply link up the app delegate with the window object and the UIViewController.

if we are not using the interface builder to load up the view, we have to code it manually. there are 2 places where we can code it. the first place is didFinishLaunchingWithOptions in the app delegate, while another place is the loadview in the UIViewController.

226月/100

how does the mvc model apply in iphone app



the job of each view controller object is two-fold. because it is part of your application’s controller layer, a view controller is responsible for coordinating interactions between your application’s visual presentation (your custom views) and your application’s data model (your custom objects). a view controller is also responsible for handling changes to the views that comprise its view layer. for example, when the user rotates a device from a portrait to a landscape orientation, the view controller is responsible for reorienting the views accordingly. fortunately, the default behavior of the UIViewController class handles much of the work needed to manage your view layer. all you have to do is specify the initial set of views and their default behaviors. after that, you can focus on the interactions between those views and your data model.

reference - http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html

206月/100

building an iphone app combining tab bar, navigation and tab

156月/100

understanding the iphone / ipad architecture

156月/100

UIApplicationDelegate protocol

106月/100

habour master

存檔在: 娛樂, 電腦 沒有回應
66月/100

creating view-based app from window-based app in xcode




just boring, so creating view-based app from window-based app in xcode

  • first, we create a window-based application from the xcode
  • next, we add a new view controller class under the "Class"

  • in the source coding, we try to link up the AppDelegate with the ViewController class.