Environment: xcode:5.0.2 IOS7 Simulator
Interface: Drag with Storyboard
Simple application: A coredata crud use case.
Interface such as (a uitableviewcontroller list query and delete select UITableViewCell after the show Detail page a uiviewcontroller to edit or add data)
Tableviewcontroller Click on the + sign push to jump to Detaiviewcontroller; Select cell and push to Detailviewcontroller (identifier: Detailviewbycell) Jump
are implemented using a wire.
The navigation sub-view may become corrupted when the page jumps to the point where the error is reported.
Output Navigation sub-view in Detaiviewcontroller based on error message
NSLog(@ "%@",self. Navigationcontroller. Viewcontrollers);
Output:
Found Detailviewcontroller there were 2 obvious jumps when there's a problem
The reason is that UITableViewCell in the choice of time with the connection when the direct push to the Detailviewcontroller,
And in the code it also implements the jump
[self performseguewithidentifier:@ "Detailviewbycell" sender:p];
Remove the code here, as for the need to pass the parameter can be Prepareforsegue in the
-(void) Prepareforsegue: (Uistoryboardsegue *) Segue sender: (ID) sender{ if ( [Segue.identifier isequaltostring:@ "detailviewbycell"]) { trdetailviewcontroller* detailvc=[Segue Destinationviewcontroller]; person * p=self.persons[[Self.tableview Indexpathforselectedrow].row]; Detailvc.editperson=p; } }
iOS learning-reported error finishing up a navigation transition in an unexpected state. Navigation Bar Subview tree might get corrupted.