if the 2 controller's view is the parent child relationship, then these 2 controllers should also be the parent child relationship? [Vc01.view AddSubview:vc02.view];? [Vc01 ADDCHILDVIEWCONTROLLER:VC02];?//adds VC02 to the vc01.childviewcontrollers array//vc01.childviewcontrollers-@[vc02]1>through the Addchildviewcontroller method, it is possible to display the small controller into a controller? [Self Addchildviewcontroller:[[hmoneviewcontroller alloc] init];? [Self Addchildviewcontroller:[[hmtwoviewcontroller alloc] init];? [Self Addchildviewcontroller:[[hmthreeviewcontroller alloc] init];?2>Declare in the????????????????????? controller [email protected] (nonatomic, weak) Uiviewcontroller*SHOWINGCHILDVC;?3>need to provide a? method to switch the sub-controller?//Index: The indexes of the sub-controllers that will need to be displayed??- (void) SWITCHVC: (int) index? { ?//1. Remove the child controller view currently being displayed? [Self.showingChildVc.view Removefromsuperview]; ?//2. Add the view of the index position corresponding to the controller? Uiviewcontroller *NEWVC =Self.childviewcontrollers[index]; ? newVc.view.frame= CGRectMake (0, -, Self.view.frame.size.width,? self.view.frame.size.height- -); ? [Self.view AddSubview:newVc.view]; ? SELF.SHOWINGCHILDVC=newvc;?} does not establish a parent-child control of its possible consequences inside? A small controller may send the following conditions:1>The law detects that more significant system events have been born (such as screen rotation events)?2> May cause Self.navigationcontroller = = Nil, Self.tabbarcontroller = =nil?3> may cause [self dismissviewcontrolleranimated:yes completion:nil] effect (unable to shut down controller)
Management of the ios-controller