2. create view controller:
(1)root controller: manage which view to present
(2)content view controller A
(3)content view controller B
3. create nib file
view xib for content view controller
4. create outlet for root controller in app delegate
add root controller's view in applicationDidFinishLaunching
[window addSubview: myRootViewController.view];
5. in root controller's class
(1)add members for content view contrllers
(2)add IBAction to switch content view
6. in IB, create root controller from View Controller
add view to root view controller
add toolbar to view
set the action of button of toolbar as root controller's switch view method
7. in IB, connect app deletgate's outlet to root controller
8. viewDidLoad: the method called when nib is loaded
note: for different iPhone, maybe need to install new profile again
沒有留言:
張貼留言