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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:24:47+00:00 2026-05-28T17:24:47+00:00

I am trying to open a ViewController from within another ViewController if certain conditions

  • 0

I am trying to open a ViewController from within another ViewController if certain conditions are met. The code seems to run without error but the view is never shown. I am new to xcode 4 /ios 5 so I must be missing something.

Here is the code responsible for opening the second viewcontroller:

CreateUserViewController *createUserController = [[CreateUserViewController alloc] initWithNibName:@"CreateUserView" bundle:[NSBundle mainBundle] keyWrapper:keyChainWrapper];

    [self presentViewController:createUserController animated:YES completion:nil];

In my project I have a xib called, “CreateUserView”. I have added a view controller to this xib and assigned it to, “CreateUserViewController”.

Also I noticed in the apple documentation that is shows setting the delegate of the viewcontroller to be presented. But it seems that no property called, “delegate” is on the viewcontroller object. Is this documentation old? This is the document I am trying to use (section 9-1):

View Controller Programming

Can someone give me a hint? Thanks..

edit Adding Custom Constructor

    -(id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil keyWrapper:(KeychainItemWrapper *)keyWrapper
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if(self){
        [self setKeyChainWrapper:keyWrapper];
    } 
             return self;
}
  • 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-28T17:24:48+00:00Added an answer on May 28, 2026 at 5:24 pm

    In iOS5 the method for pushing new view controllers was really changed around quite a bit from iOS4 and Xcode 3. In summary, storyboards are now used to create your application view controller flow. Even though you may use standalone .xib files to build an application it is much less common in iOS5.

    Anyway, the main method for pushing new view controllers onto the screen is done using segues. Check out this tutorial for an introduction: http://www.raywenderlich.com/5138/beginning-storyboards-in-ios-5-part-1

    It does a good job on explaining how to create a storyboard and use segues. You can still present view controllers in code “the old way” but it is much much less common now with the introduction of these new technologies. There are also some absolutely awesome tutorials on iTunes U – search for CS193P. It’s the Stanford Introductory class to Objective-C and programming for iOS. This should get you started and maybe help you think of a way to push your createUserController in a way more up to speed with iOS5.

    UPDATE

    I just wanted to add. If you configure your program to use storyboards and segues you can use the method performSegueWithIdentifier:sender: to perform the segue to your createUserController view if the proper conditions are met. See the Apple API for UIViewController for information on how to use this method.

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

Sidebar

Related Questions

I am trying to open one window from another using makeKeyAndOrderFront. The new window
I trying to open C: directly with FileStream without success: new FileStream(C:, FileMode.Open, FileAccess.Read,
I'm trying to open and read from a serial port using the System.IO.Ports.SerialPort class.
when trying to open report server url http://<>/Report server i am getting error /
I am trying to open an preview.aspx page in a seperate window from INSIDE
I'm trying to open the zip code lookup page on the usps website and
I am trying to open a web page with a Silverlight App from a
I'm trying open a txt file and read it, but I'm getting a type
im trying to open a popup with nothing but the content using javascript in
I am trying to open a terminal that would execute a code and copy

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.