Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6622575
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:25:27+00:00 2026-05-25T21:25:27+00:00

I have an UINavigationController and the first view is an UIView. I’ve setup two

  • 0

I have an UINavigationController and the first view is an UIView. I’ve setup two buttons and each one pushes another view , both UITableViewControllers.
The first buttons works just fine. The problem is: when I’m in the second TableViewController and I tap on the back button it tries to push the view again and only the second time it goes back to the Main View.
I also have an UITabBarController setup and I noticed that if I am in my first tab(the Main View with the two buttons pushing the two tableviews and precisely in the second view ) and i tap on another tab then tap back on the first – it shows me the content of my first UITableViewController and when I tap back it shows the second UITableViewController(that is supposed to be displayed) and only the second time i tap it goes to the Main View.

I don’t know if it’s understandable what I just said, here is also the code for the back button and the action for it:

- (void)viewDidLoad {
    [super viewDidLoad];
    UIButton *back= [UIButton buttonWithType:UIButtonTypeCustom];  
    UIImage *backImage = [[UIImage imageNamed:@"backb.png"]  
                          stretchableImageWithLeftCapWidth:10 topCapHeight:10];  
    [back setBackgroundImage:backImage forState:UIControlStateNormal];  
    [back addTarget:self action:@selector(cancel:)  
   forControlEvents:UIControlEventTouchUpInside];  
    back.frame = CGRectMake(0, 0, 37, 26);  
    UIBarButtonItem *cancelButton = [[[UIBarButtonItem alloc]  
                                      initWithCustomView:back] autorelease];  
    self.navigationItem.leftBarButtonItem = cancelButton;
}


-(IBAction)cancel:(id)sender{  
    [self.navigationController popViewControllerAnimated:YES];  
}

The back button in the first UITableViewController is setup the same and works just fine…what could be the problem?

I’ve just added another UITableViewController and obviously now when I’m in the third view and I try to go back to the Main View it loads the view two times and the first UITableViewController before it goes back…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T21:25:27+00:00Added an answer on May 25, 2026 at 9:25 pm

    There are chances that you have pushed the second view controller twice. While you push multiple instances of view controllers at the same time, you won’t see any difference in the pushing animation. It’d look like only one controller is being pushed. This is because you push the next view controller before the previous view controller was pushed completely.

    Check your code if you are pushing the second view controller twice.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two views controlled by a uinavigationcontroller. the first view has a UIWebView
I have UINavigationController based app with two views. On the first view there is
I have a project: first view is uitableview, when you select row uinavigationcontroller pushes
I have a UINavigationController. In its toolbar is a segmented control with two buttons.
I have a view based project with a set of buttons. When one of
I have a UINavigationController with two screens - each screen with its own nav
I have created one navigation based application. In that first view show me the
So I have this UINavigationController, I'm on the first moving to the next view,
I have one issue with UInavigationcontroller In my firstview i have button.If i click
I have a UINavigationController inside a UITabBarController. When a user presses the first tab,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.