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 3356548
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T02:31:33+00:00 2026-05-18T02:31:33+00:00

My issue is that the back button will not restore its visibility if my

  • 0

My issue is that the back button will not restore its visibility if my web request does not finish before or soon after ViewWillAppear has fired.

I have a navigation based iPhone 4.0 application used a simple Root and Detail view setup.
I am working with data that is returned from a webservice so when I push my detail view in its ViewDidLoad function I call my web service method in a separate thread and the Iphone lifecycle does its thing on the main thread. I must disable/hide the back button until the web request has finished (or failed) so I call self.navigationItem.hidesBackButton = YES; in ViewDidLoad and self.navigationItem.hidesBackButton = NO; in the delegate function which fires once my web request has finished or failed.

I already tried the following:

[self.navigationItem performSelectorOnMainThread:@selector(setHidesBackButton:) withObject:NO waitUntilDone:NO];
[self.navigationItem setHidesBackButton:NO];
[self.view setNeedsDisplay];
[self.navigationController.view setNeedsDisplay];

UINavigationItem *nav = self.navigationItem;
nav.hidesBackButton = NO;

Root View Controller Push Code:

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
 ArticleViewController *articleViewController = [[ArticleViewController alloc] initWithNibName:@"ArticleViewController" bundle:nil];
 NewsArticle *newsArticle = [newsItems objectAtIndex:indexPath.row];
 articleViewController.articleID = newsArticle.newsID;
 [self.navigationController pushViewController:articleViewController animated:YES];

 [newsArticle release];
 [articleViewController release];
}

Details View Controller Code:

- (void)viewDidLoad {
 [super viewDidLoad];

 self.navigationItem.hidesBackButton = YES;
 id scrollView = [[[self webContent] subviews] objectAtIndex:0];
 if([scrollView respondsToSelector:@selector(setBackgroundColor:)] )
 {
  [scrollView performSelector:@selector(setBackgroundColor:) 
       withObject:[UIColor blackColor]];
 }

 [self getNewsArticle];
}

//Fires when the web request has finished
- (void) finish:(NewsArticle *)newsArticleFromSvc {
 self.navigationItem.hidesBackButton = NO;
 self.newsArticle = newsArticleFromSvc;
 [self bindNewsArtice];
}

Any help is GREATLY appreciated I can hardly @#$&^ believe that hiding a button in a UI could cause me this much wasted time.

  • 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-18T02:31:34+00:00Added an answer on May 18, 2026 at 2:31 am

    I wasn’t able to solve this problem. Instead I tweaked my App Logic to make hiding he back button not necessary.

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

Sidebar

Related Questions

I have a strange, sporadic issue. I have stored procedure that returns back 5
The issue that prompted me to ask this is a web form that was
I have an issue that is driving me a bit nuts: Using a UserProfileManager
An odd issue that I have been trying to address in a project -
I have a database issue that i currently cannot wrap my head around with
I have a weird issue that only seems to be affecting IE 7. The
I came across an issue that makes me think there is bug in the
I have a design issue that I would appreciate some input on. I would
I've got an issue that was wondering if could be solved in a particular
I have issue that is reproduced on g++. VC++ doesn't meet any problems. So

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.