iOS learning-reported error finishing up a navigation transition in an unexpected state. Navigation Bar Subview tree might get corrupted.

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.