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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T16:05:34+00:00 2026-05-29T16:05:34+00:00

I have added a navigation controller in iphone app from my home screen it

  • 0

I have added a navigation controller in iphone app from my home screen it takes to a tableview from the table view it takes to the detail.I am able to navigate between the views back and forth.what I want is navigate directly from detail view to my home screen.Is there any possibility to do that?

- (void)viewDidLoad {


[super viewDidLoad];

self.navigationItem.hidesBackButton = TRUE;
UIBarButtonItem *saveButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemSave target:self action:@selector(save)]; self.navigationItem.leftBarButtonItem = saveButton;   



id1 =    [[NSUserDefaults standardUserDefaults] valueForKey:@"id1"];
theTitle = [[NSUserDefaults standardUserDefaults] valueForKey:@"theTitle"];
self.title=theTitle;
NSLog(@"hi %@", id1);
hello=@"hello";
NSLog(@"ahhhha sdfgs :%@",theTitle);

urlAddress = [NSString stringWithFormat:@"http://dev-parkguiden.knutpunkten.se/Api/GetPark?parkid=%@",self.id1];
baseURL =[[NSURL URLWithString:urlAddress]retain];

jsonData=[NSData dataWithContentsOfURL:baseURL];

NSDictionary *items=[NSJSONSerialization JSONObjectWithData:jsonData options:NSJSONReadingMutableLeaves error:nil];

boom=[items objectForKey:@"description"];
latitude=[items objectForKey:@"latitude"];
longitude=[items objectForKey:@"longitude"];
NSLog(@"retard:%@",latitude);
  NSLog(@"retard:%@",longitude);
NSString *html = [NSString stringWithFormat:@"<html><body><p>%@</p></body></html>", boom];  
[self.webview loadHTMLString:html baseURL:nil]; 


[[NSUserDefaults standardUserDefaults] setValue:latitude forKey:@"lat"];
[[NSUserDefaults standardUserDefaults] setValue: longitude forKey:@"lot"];
[[NSUserDefaults standardUserDefaults] setValue: theTitle forKey:@"title"];

}

  • 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-29T16:05:35+00:00Added an answer on May 29, 2026 at 4:05 pm

    you have to just set custom back button and set button click event
    // hide back button first

    self.navigationItem.hidesBackButton = TRUE;  
    
    /// Add new Back Button 
    
    UIButton *back = [[UIButton buttonWithType:UIButtonTypeCustom] retain];
    back.frame = CGRectMake(0, 0, 50, 32);
    [back setShowsTouchWhenHighlighted:TRUE];
    [back setBackgroundImage:[UIImage imageNamed:@"backBtn.png"] forState:UIControlStateNormal];
    [back addTarget:self action:@selector(backBtnTap:) forControlEvents:UIControlEventTouchDown];
    UIBarButtonItem *backBtn = [[UIBarButtonItem alloc] initWithCustomView:back];
    self.navigationItem.leftBarButtonItem = backBtn;
    
    /// Press button event to go to root or say home page
    -(void)backBtnTap:(id)sender{
            [self.navigationController popToRootViewControllerAnimated:YES];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a navigation controller based app, and added some toolbar items with code
In my iphone app, i have a navigation Controller and a tabBar Controller. The
I have a tableview with a navigation bar at the top. I've added text
I have an iPhone application that's using Navigation Controller to display the top bar
I have setup some views with the navigation controller. I want to be able
I have a navigation controller and in it a view controller: -NavigationController1 --MyViewController And
I have got a view controller with a UIView and a navigation controller configured
What I want to do is to have my table view controller appear when
I've added a navigation bar to a UIViewController. It is displayed from another UIViewController
I have a navigation controller and when I place an image for navigation bar

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.