¡@

Home 

2014/10/15 ¤U¤È 10:16:04

iphone Programming Glossary: yellowviewcontroller

View Controllers: How to switch between views programmatically?

http://stackoverflow.com/questions/910994/view-controllers-how-to-switch-between-views-programmatically

SwitchViewController UIViewController IBOutlet BlueViewController blueViewController IBOutlet YellowViewController yellowViewController IBAction switchViews id sender @property nonatomic retain BlueViewController blueViewController @property nonatomic retain.. @property nonatomic retain BlueViewController blueViewController @property nonatomic retain YellowViewController yellowViewController @end 1. remove yellow view and insert blue view IBAction switchViews id sender if self.blueViewController.view.superview.. remove yellow view and insert blue view IBAction switchViews id sender if self.blueViewController.view.superview nil yellowViewController.view removeFromSuperview self.view insertSubview blueViewController.view atIndex 0 2. appear insert disappear remove if..