iOS Developer Library

Developer

UIAApplication Class Reference

Options
Deployment Target:

On This Page

UIAApplication

The UIAApplication class allows access to, and control of, app-level user interface elements.

For an explanation of how to use this and related classes, see Automating UI Testing in Instruments User Guide.

  • Returns the action sheet.

    Declaration

    (UIAActionSheet) actionSheet()

    Availability

  • Returns the alert.

    Declaration

    (UIAAlert) alert()

    Availability

  • Returns a string containing the app’s bundle ID in reverse-DNS format.

    Declaration

    (String) bundleID()

    Availability

  • Returns the app’s edit menu.

    Declaration

    (UIAEditingMenu) editingMenu()

    Availability

  • Returns the interface orientation.

    Declaration

    (Number) interfaceOrientation()

    Discussion

    Interface orientation represents the rotation required to keep the interface right-side up upon device rotation. Note that in landscape mode, device orientation and interface orientation are opposite, because rotating the device requires rotating the content in the opposite direction.

    Availability

  • Returns the app’s keyboard.

    Declaration

    (UIAKeyboard) keyboard()

    Availability

  • Returns the object that represents the app’s main window.

    Declaration

    (UIAWindow) mainWindow()

    Availability

  • Returns the app’s navigation bar.

    Declaration

    (UIANavigationBar) navigationBar())

    Availability

  • Gets the value of a specified app user preference.

    Declaration

    (NotTyped) preferencesValueForKey(key)

    Parameters

    key

    The key representing the preference to be set.

    Availability

  • Sets the value of a specified app user preference.

    Declaration

    (undefined) setPreferencesValueForKey(NotTyped value, String key)

    Parameters

    value

    The new value to set for the specified preference.

    key

    The key representing the preference to be set.

    Availability

  • Returns the app’s status bar.

    Declaration

    (UIAStatusBar) statusBar()

    Availability

  • Returns the app’s tab bar.

    Declaration

    (UIATabBar) tabBar()

    Availability

  • Returns the app’s toolbar.

    Declaration

    (UIAToolbar) toolbar()

    Availability

  • Returns a string representing the build version number of the app.

    Declaration

    (String) version()

    Discussion

    The build version is represented by a string comprising three period-separated integers.

    Availability

  • Returns an array of objects representing the app’s windows.

    Declaration

    (UIAElementArray) windows()

    Availability