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

  • Home
  • SEARCH
  • 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 8284219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T11:01:32+00:00 2026-06-08T11:01:32+00:00

This question might have been answered, if yes, please share the link. I have

  • 0

This question might have been answered, if yes, please share the link.

I have created a Single View Application, It works fine, but now I have added a new view and on a button click, wants the new view to appear.

This is the code for click action,

    SettingsViewController *settingsViewController = [[SettingsViewController alloc] initWithNibName:@"SettingsViewController" bundle:[NSBundle mainBundle]];

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

The Default ViewController now looks like this in .h file

    @interface ViewController : UIViewController<UIImagePickerControllerDelegate, UINavigationControllerDelegate>

The SettingsViewController.m has a default

    - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil{}

Can I add another view to “Single View Application” like this or should I chose another template for my project ?

Thanks.

  • 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-06-08T11:01:34+00:00Added an answer on June 8, 2026 at 11:01 am

    You need to create a UINavigationController in your AppDelegate. Then make your ViewController the rootViewController of the UINavigationController. Then you will be able to push and pop views.

    Here is the code to create the rootViewController where mainNavigationController is the UINavigationController in your AppDelegate:

    ViewController *vc = [[ViewController alloc] init];
    mainNavigationController = [[UINavigationController alloc] initWithRootViewController:vc];
    

    Once you have the ViewController set up as the rootViewController it will conform to the UINavigationController push and pop methods to create a stack of UIViewControllers.

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

Sidebar

Related Questions

this question might have been answered before, but after two days of searching I
I know this might ma a simple question, it must have been answered before
This question might have been answered, but I can't find a solution to my
I believe this question might have been previously attempted in 2006 on a different
I know this question might have already been discussed a thousands of times but
Hey this might be a simple question, but i have been stumped on it
This question might have been asked many times but still there are many factors
I know this question might have been asked a few times already, but I
I know that this question might have been asked like 100 times, but, believe
This question might have been asked several times, but i didn't find a solution

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.