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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T16:37:36+00:00 2026-05-29T16:37:36+00:00

In followup to Where has "window-based" project gone? , what are the steps needed

  • 0

In followup to Where has "window-based" project gone?, what are the steps needed to modify an empty application to a window-based application in MonoTouch using Xcode 4.2?

I am learning iOS development and have read about 1 1/2 books (most recently, “iOS Programming: The Big Nerd Ranch Guide (2nd Edition)” — nice book). I found instructions here on converting an empty application to a window-based application for Objective-C.

I tried applying these steps to a sample MonoTouch application and I get run-time errors related to needing a root view controller.

Is there a site that lists the steps in small words for simple minds?

  • 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-29T16:37:38+00:00Added an answer on May 29, 2026 at 4:37 pm

    Here are the steps I discovered by downloading a window-based application sample from the source code of one of my Monotouch books (http://www.apress.com/9781430231745) and then creating an empty solution. I compared the files and added the things needed to the empty one to make it look (and act) like the window-based one.

    • Change the line UIApplication.Main (args, null, "AppDelegate"); in Main to UIApplication.Main (args);.

    • Add an AppDelegate-derived class to the file Main.cs (inside the namespace):

        // The name AppDelegate is referenced in the MainWindow.xib file.
        public partial class AppDelegate : UIApplicationDelegate
        {
            // This method is invoked when the application has loaded its UI and its ready to run
            public override bool FinishedLaunching (UIApplication app, NSDictionary options)
            {
                // If you have defined a view, add it here:
                // window.AddSubview (navigationController.View);
    
                window.MakeKeyAndVisible ();
    
                return true;
            }
        }
    
    • Remove the file AppDelegate.cs (delete it from the project).

    • Add a new Empty iPhone Interface Definition file and name it MainWindow.xib.

    • Add a new empty C# file and name it MainWindow.xib.designer.cs. Insert the following code:

        using MonoTouch.Foundation;
    
        namespace MY_NAMESPACE
        {
            [Register ("AppDelegate")]
            partial class AppDelegate
            {
                [Outlet]
                MonoTouch.UIKit.UIWindow window { get; set; }
    
                void ReleaseDesignerOutlets ()
                {
                    if (window != null) {
                        window.Dispose ();
                        window = null;
                    }
                }
            }
        }
    
    • Change MY_NAMESPACE to your namespace.

    • Open MainWindow.xib in the Interface Builder (Xcode 4.2).

    • Change the class for the File’s Owner to UIApplication (third tab – Identity Inspector).

    • Add a new Object object (search for object in the widgets list) and change the class to AppDelegate.

    • Add a new Window object.

    • Select the File’s Owner, click the last tab in the inspectors (Connections Inspector) and connect the delegate link to the App Delegate.

    • Select the App Delegate and connect the window link to your new window.

    • Save the MainWindow.xib file changes in Interface Builder.

    • Return to MonoDevelop.

    • Open the file Info.plist and change the Main Interface to MainWindow.

    I’m getting a warning about Applications are expected to have a root view controller at the end of application launch, but the application seems to run. I suspect that the warning is coming from some difference in the .xib file. Perhaps the Xcode 3.2 version includes some indication that this is the root view controller. How do I get rid of this warning?

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

Sidebar

Related Questions

This is a followup to an earlier question ( Help Refining RegEx ("\b\d{6}([ ]{1,15})\d{7}\b")
I post this question has followup of This question , since the thread is
Based on the HTTP Request Method and Headers, a HTTP server has to determine
class Followup < ActiveRecord::Base belongs_to :post belongs_to :comment end This model needs to only
THis is a followup to my previous question Font-dependent control positioning. It's an attempt
This is a followup question of How to encode characters from Oracle to Xml?
As a followup to my question about the java.awt.Component.getName() property , I'm wondering if
As kind of a followup to this question I've gotten a solution working on
This is a followup to this question . I seem to be stuck on
This is a followup on the question: ASP.NET next/previous buttons to display single row

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.