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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T20:19:55+00:00 2026-06-03T20:19:55+00:00

I am using StoryBoards in Monotouch and have a ViewController which has been designated

  • 0

I am using StoryBoards in Monotouch and have a ViewController which has been designated as the Initial VC. I have a second VC that I want to display programmatically from the ViewDidLoad method of the first VC. The Objective-C steps are like so

  1. Instantiate second VC via Storyboard.InstantiateViewController("SecondVC")
  2. Set its ModalTransitionalStyle
  3. Set its delegate to self like secondVC.delegate = self;
  4. use this.PresentViewController(secondVC, true, nil)

How do I accomplish that in MonoTouch C# code?

the VC that I instantiate using Storyboard.Ins.. method does not have a delegate or Delegate property to set. And although my code compiles, I do not see the second view. I see only the first View

Any help highly appreciated

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-03T20:19:57+00:00Added an answer on June 3, 2026 at 8:19 pm

    You should be able to do this if you call it on a delay. I used a Threading.Timer to call PresentViewController a second after load. As far as the delegate, a UIViewController does not have that property. You will have to cast to the controller type that is applicable to the controller you are loading. Then you can set the delegate. You will probably want to set the WeakDelegate instead of the Delegate if you want to use this (self).

    public override void ViewDidLoad ()
    {
        base.ViewDidLoad ();
    
        Timer tm = new Timer (new TimerCallback ( (state)=> {
            this.InvokeOnMainThread (new NSAction (()=> {
                UIStoryboard board = UIStoryboard.FromName ("MainStoryboard", null);
                UIViewController ctrl = (UIViewController)board.InstantiateViewController ("Number2VC");
                ctrl.ModalTransitionStyle = UIModalTransitionStyle.CrossDissolve;
                this.PresentViewController (ctrl, true, null);
            }));
        }), null, 1000, Timeout.Infinite);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a regular ViewController that contains a TableView. I am using storyboards to
I have an iOS project (not using Storyboards) that has 2 UITextField and 1
I have a Table View Controller which I have designed using storyboards. This has
I have created a new project in Ios5 using storyboards and my project has
Dynamic animation using storyboards There is a question i have found that relates directly
I'm using storyboards and I have a UITableView. I have a segue setup that
I have an ios5 app developed using storyboards that currently displays a tab bar
I am using storyboards for my app.In that I have a UITableViewController class.I am
I'm using Storyboards and I basically have this: It's a mapView that presents modally
I have this code (XCode 4, using Storyboards with ARC) which takes data from

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.