iPad

From $1
    Table of contents

    Working with MonoTouch/iPad

    With the introduction of the iPad, developers can choose what kind of application they want to build:

    • iPhone or iPod-touch only applications
    • iPad-only applications
    • Universal applications: that can run on iPhone, iPod Touch or iPad platforms.

    IPad Project Templates

    In addition to the existing iPhone and iPod Touch project templates, new project templates have been created for both iPad applications and universal applications.      With these templates you can create either iPad-only applications or universal applications.

    If you have an existing iPhone application, upgrading it to run on the iPad is very simple, you need to:

    • Set the minimum required OS version to 3.2 (see below)
    • Set the kind of application that you are building (see below)
    • Follow the Apple recommended guidelines for the iPad to target the iPad.
    • Select the resolutions you want to support

    Configuring Your Application

    In the "iPhone Build" settings pane in the project properties you need to make sure that you have selected the "Minimum OS Version" to be 3.2.   iOS 3.2 is the first version that supported the iPad.

    In the "iPhone Application" settings pane in the project properties you can configure the kind of application that you want to build, the options are:

    • iPhone only
    • iPad only
    • iPhone and iPad (universal applications)

    This is how you configure the UI based on the above setting:

      Main Interface File iPad Interface File
    iPhone or iPod Touch Main UI Unused
    iPad Main UI on the iPad Unused
    Universal (iPad/iPhone/iPod Touch) UI file used when the program runs on the iPhone or the iPod Touch UI file used when program runs on the iPad

    You also need to pick the orientations that your application will support.   You do this in the iPhone application section in your project properties by setting the proper value in "Orientation".

    Testing your application

    You can use the new iPhone Simulator Target option in the Project menu to pick which version of the iPhoneOS SDK to start up with and which simulator will be used (iPhone simulator or iPad simulator).  Changing this setting will change both the runtime and simulator used by the Run and Debug commands.

    Additionally, if you just want to quickly launch your application with a different SDK or simulator, you can use the new Run With option from the Run menu.

    Interface Builder and MonoDevelop.

    When you add new Interface Builder elements to iPad projects, with the exception of the MainWindow added in the project template, they still default to their iPhone counterparts.  To change this, double clicking the XIB file in the Solution Pad after adding it and performing the following actions:

    1. Click File->Transition To->iPad
    2. Close the old iPhone style XIB
    3. File->Save As and overwrite the old XIB with the transitioned one

    Downgrading

    If you want to downgrade MonoTouch to the old APIs, you should re-install the monotouch.pkg package that you got originally.

    Testing in iPad iPhone Mode

    If you would like to test your existing projects in the iPad iPhone mode.  Simply change the Target SDK version to 3.2 in the appropriate project configuration.

    Determining Running Device

    You can check the UIScreen.MainScreen.Bounds.  The new iPad runs at 1024x768 whereas the iPhone runs at 480x320

    Tag page
    • No tags

    Files (0)

     
    Page last modified 11:42, 18 Jul 2011 by Miguel