iOS Guides | Samples

MonoTouch.UIKit.UIApplicationState Enumeration

An enumeration indicating the current application state.

Syntax

[MonoTouch.ObjCRuntime.Introduced(MonoTouch.ObjCRuntime.PlatformName.iOS, 4, 0, MonoTouch.ObjCRuntime.PlatformArchitecture.None, null)]
[MonoTouch.ObjCRuntime.Native]
[MonoTouch.ObjCRuntime.Unavailable(MonoTouch.ObjCRuntime.PlatformName.WatchOS, MonoTouch.ObjCRuntime.PlatformArchitecture.All, null)]
public enum UIApplicationState

Remarks

When the user taps on the app icon, the app briefly goes through a transitional state of UIApplicationState.Inactive on its way to becoming UIApplicationState.Active. This is where the app gets itself ready to display to the user.

When the app is open, the application state is UIApplicationState.Active.

If the user presses the home button, and is returned to the springboard (home screen), or the application is interrupted by something, such as a phone call, the application state transitions back to UIApplicationState.Inactive.

For the application state of your app to become UIApplicationState.Background, your application would have to register for a background process.

Reference: http://stackoverflow.com/questions/7937400/need-clarification-about-uiapplicationstate

Members

Member NameDescription
ActiveThe application is currently active and on the foreground
BackgroundThe application is executing in the background. It does not receive events.
InactiveThe application is in the foreground but not receiving events. The application is placed in this state when moving in and out of the foreground state and also when the application is interrupted by a system notification.

Requirements

Namespace: MonoTouch.UIKit
Assembly: monotouch (in monotouch.dll)
Assembly Versions: 0.0.0.0

The members of MonoTouch.UIKit.UIApplicationState are listed below.

See Also: Enum

Public Fields

ActiveUIApplicationState. The application is currently active and on the foreground
BackgroundUIApplicationState. The application is executing in the background. It does not receive events.
InactiveUIApplicationState. The application is in the foreground but not receiving events. The application is placed in this state when moving in and out of the foreground state and also when the application is interrupted by a system notification.