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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T15:38:10+00:00 2026-05-21T15:38:10+00:00

I am new to iPhone programming. what I am trying is I have one

  • 0

I am new to iPhone programming. what I am trying is I have one screen with a button. And I want to change the view controller not only the view when I click that button (I know how to add subview) because from that 2nd view controler, I have to go to the third view which is not possible if I add subview in first place. Can anybody please help me with that? Is this possible? and if yes, how? All the views and view controller are created programmaticaly. I am not using IB.

EDIT: here is the relevant code that fires when clicking button

-(id)showCurrentLoc:(id)sender { 
 locationController = [currentLocController alloc]; 
 [entry removeFromSuperview]; 
 [newLoc removeFromSuperview]; 
 [currentLoc removeFromSuperview]; 
 [self.view setBackgroundColor:[UIColor clearColor]]; //[self.view addSubview: [locationController view]]; 
 [self.navigationController pushViewController:locationController animated:YES];  [locationController release]; 
 return 0; 
} //Location Controller is the tableViewController

Thanks
Vik

  • 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-21T15:38:11+00:00Added an answer on May 21, 2026 at 3:38 pm

    Usually, you use a navigation controller for this sort of thing so that the user can easily go back to the previous view. Your view controller would then do something like this:

    [self.navigationController pushViewController:someNewViewController animated:YES];
    

    If you want to manage the view controllers yourself, you can always just change the window’s rootViewController property. Please read View Controller Programming Guide for the complete picture.

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

Sidebar

Related Questions

I'm quite new in iPhone Programming, but I'm trying to do my best cause
I'm fairly new to iPhone programming and am trying to implement a double-component PickerView.
I'm new to iPhone programming, and I'm trying to make a simple program without
I am new to iPhone programming, however, I have been researching my problem for
Iam new to iPhone Programming,Now i want to know about what is the uses
I am new to iPhone programming and Objective-C. I am building a View-based application.
I'm new to Objective-C and iPhone development, and I'm trying to store floating-point values
I'm new to iPhone and Objective C programming but I'm able to make my
I am trying to learn my first programming language. Unfortunately I picked the Iphone
I'm very new to iPhone programming, and I'm currently following tutos to understand the

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.