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

The Archive Base Latest Questions

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

As you guess am still a newbie, getting my head around iphone development. I

  • 0

As you guess am still a newbie, getting my head around iphone development.
I am just trying out basic view loading on demand, which i cant get to work

I have an app, with 2 view controllers, each view controller connected a different nib file.
I am trying to switch between view manually; there is no navigation control involved.

How can i manually push the second view to the first view?
self.navigationController pushViewController wont work since there is no navigation controller.
How else can I push the second view on top of the first view and destroy the first view; and ofcourse vice versa?
I have done this in the first view’s button action:

SecondView *sv=[[SecondView alloc] initWithNibName:@"SecondView" bundle:nil];
[self.navigationController pushViewController:sv animated:YES];

obviously, it didn’t work.

window addSubView didn’t work either, because the first view controller is the root view controller (not sure i said that right). In other words, when i run the app, the first view is what I see with a button that is supposed to load the second view.

I have spent hours searching for a simple example, and I couldn’t find any.

Any suggestions?

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

    in the first view controller you need this:

    - (IBAction)pushWithoutViewController:(id)selector {
        NextNavigationController *page = [[NextNavigationController alloc] initWithNibName:NextNavigationController bundle:nil];
        CGRect theFrame = page.view.frame;
        theFrame.origin = CGPointMake(self.view.frame.size.width, 0);
        page.view.frame = theFrame;
        theFrame.origin = CGPointMake(0,0);
        [UIView beginAnimations:nil context:nil]; 
        [UIView setAnimationDuration:0.8f];
        page.view.frame = theFrame;
        [UIView commitAnimations];
        [self.view addSubview:page.view];
        [page release];
    }
    

    and then link it to the button in nib. 🙂

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

Sidebar

Related Questions

Still a rails and ruby newbie, and I'm trying to figure out why adding
I've been trying to wrap my head around this issue for the last hours
Why app is still working, when i close it. I guess it is caused
Ok so sorry for being, I guess, a bit off topic but still I
I guess I still don't get git as I'd hoped... I was creating a
I'm currently solving a programming problem to enhance my skills (I'm still a newbie)
I'm quite new in F#. I guess arrays are still collections, so I could
I'm still kind of new to the erlang/otp world, so I guess this is
I guess this question may sound very noobish for a lot of people around
I am an Objective-C newbie, who still does not have a Mac, but still

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.