Class
iOSApplication
Warning
This item was deprecated in version 2020r2. Please use MobileApplication as a replacement.
Description
The base class for iOS apps.
Properties
Name |
Type |
Read-Only |
Shared |
---|---|---|---|
✓ |
|||
✓ |
|||
✓ |
Events
Name |
Parameters |
Returns |
---|---|---|
Property descriptions
iOSApplication.CurrentScreen
CurrentScreen As iOSScreen
The currently displayed screen. You can use this property to access the current screen so that you can change its content.
This property is read-only.
The screen is typically the base (first) view that was displayed in a phone app. It may also refer to a Split View or a Tab screen.
In most cases you will want to use the iOSView.PushTo method to display a new view over this initial view. This retains the view hierarchy and allows the back button to go back to the previous view.
There may be times when you need to replace the entire screen and do not want the view hierarchy. For example, you may have an initial login view that is displayed but after the user successfully logs in and you want to replace that view with another view so that the back button does not return the user to the login view.
You can directly change the screen content like this to swap in a new view:
Var myNewView As New MyView
App.CurrentScreen.Content = myNewView
Use the same technique to swap in a new iOSLayout, iOSSplitView or iOSTabBar. For example, this swaps in a new screen:
Var s As New MySpecialScreen
App.CurrentScreen.Content = s.Content
iOSApplication.DefaultiPadScreen
DefaultiPadScreen As iOSScreen
Set to the default iOSScreen to use when the app is launched on an iPad-sized device.
This property is read-only.
If no DefaultiPadScreen is specified, the app will still run on an iPad but will use the DefaultiPhoneScreen, running it in "scaled" mode.
One or both of DefaultiPhoneScreen and DefaultiPadScreen must be specified.
By specifying separate screens for DefaultiPhoneScreen and DefaultiPadScreen, you can have completely different layouts for each type of device.
iOSApplication.DefaultiPhoneScreen
DefaultiPhoneScreen As iOSScreen
Set to the default iOSScreen to use when the app is launched on an iPhone-sized device.
This property is read-only.
If you do not specify a DefaultiPhoneScreen, then the app will not run on iPhone-sized devices.
One or both of DefaultiPhoneScreen and DefaultiPadScreen must be specified.
By specifying separate screens for DefaultiPhoneScreen and DefaultiPadScreen, you can have completely different layouts for each type of device.
Event descriptions
iOSApplication.LowMemoryWarning
LowMemoryWarning
Called when iOS reports a low-memory situation. Apps should attempt to free up objects and other resources when this event is raised. If the low-memory situation persists, iOS may kill your app.
Your implementation of this method should free up as much memory as possible by purging cached data objects that can be recreated (or reloaded from disk) later. It is strongly recommended that you implement this method. If your app does not release enough memory during low-memory conditions, the system may terminate it outright.
iOSApplication.Open
Open
Called when the iOS app is first launched.
The launchOptions parameter is a reference to an NSDictionary.
More information here: UIApplicationDelegate
Return True if your app has handled the request. The default of False means your app cannot handle launch options.
iOSApplication.UnhandledException
UnhandledException
Called if the app had an exception and did not handle it. If the event is not implemented or the event handler returns False, the application will terminate.
Notes
You can change the iOS App Name using an IDE Script like this:
PropertyValue("App.iOSAppName") = "MyApp"
Compatibility
iOS projects on the iOS operating system.
See also
Object parent class; iOSLayout, iOSSplitView, iOSTabBar