简体   繁体   中英

navigation bar back button repeated

I have a tableView with push segue to a detailView, and in this second view a button that perform a segue to a map location.

My problem is the back button of navigation bar appear twice (different icons also) in the map location view.

I guess is something of pushing twice the navigationbar, but I can't resolve it.

and this the method that I use to perform segues, to the detail view first

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {

 if ([segue.identifier isEqualToString:@"segue_ID"]) {

        NSIndexPath *indexPath = [self.tableView indexPathForSelectedRow];
        //here I pass info between views

        DetailView *destViewController = segue.destinationViewController;       
    }
}

and to the map:

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {

if ([segue.identifier isEqualToString:@"showMap"]) {

        MapViewController *vc = [segue destinationViewController];
       //here I pass info between views

        vc.object = self.object;

    }
}

Any help? please

Have you put in LeftBarButtonItem, and also BackButtonItem for your nav bar?

Try making one of them nil.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM