TiApp Class Reference
Inherits from | TiHost |
Conforms to | UIApplicationDelegate |
Declared in | TiApp.h |
Overview
TiApp represents an instance of an application. There is always only one instance per application which could be accessed through app class method.
Tasks
-
window
Returns application’s primary window.
property -
remoteNotification
Returns details for the last remote notification.
property -
localNotification
Returns local notification that has bees sent on the application.
property -
controller
Returns the application’s root view controller.
property -
+ app
Returns singleton instance of TiApp application object.
-
– launchOptions
Returns application launch options
-
– remoteDeviceUUID
Returns remote UUID for the current running device.
-
– startNetwork
Tells application to show network activity indicator.
-
– stopNetwork
Tells application to hide network activity indicator.
-
disableNetworkActivityIndicator
Prevents network activity indicator from showing. Setting this property to YES disables appearance of network activity indicator when startNetwork is called. In case network activity indicator is currently visible, it will be hidden.
property -
– showModalController:animated:
Tells application to display modal view controller.
-
– hideModalController:animated:
Tells application to hide modal view controller.
-
– userAgent
Returns user agent string to use for network requests.
-
– sessionId
Returns unique identifier for the current application launch.
Properties
controller
Returns the application’s root view controller.
@property (nonatomic, retain) TiRootViewController *controller
Declared In
TiApp.h
disableNetworkActivityIndicator
Prevents network activity indicator from showing. Setting this property to YES disables appearance of network activity indicator when startNetwork is called. In case network activity indicator is currently visible, it will be hidden.
@property (nonatomic, assign) BOOL disableNetworkActivityIndicator
See Also
Declared In
TiApp.h
localNotification
Returns local notification that has bees sent on the application.
@property (nonatomic, readonly) NSDictionary *localNotification
Return Value
Dictionary containing details about local notification, or nil.
Declared In
TiApp.h
Instance Methods
hideModalController:animated:
Tells application to hide modal view controller.
- (void)hideModalController:(UIViewController *)controller animated:(BOOL)animated
Parameters
- controller
The view controller to hide.
- animated
If YES, animates the view controller as it’s hidden; otherwise, does not.
Declared In
TiApp.h
launchOptions
Returns application launch options
- (NSDictionary *)launchOptions
Return Value
The launch options dictionary.
Discussion
The method provides access to application launch options that became available when application just launched.
Declared In
TiApp.h
remoteDeviceUUID
Returns remote UUID for the current running device.
- (NSString *)remoteDeviceUUID
Return Value
Current device UUID.
Declared In
TiApp.h
sessionId
Returns unique identifier for the current application launch.
- (NSString *)sessionId
Return Value
Current session id.
Declared In
TiApp.h
showModalController:animated:
Tells application to display modal view controller.
- (void)showModalController:(UIViewController *)controller animated:(BOOL)animated
Parameters
- controller
The view controller to display.
- animated
If YES, animates the view controller as it’s presented; otherwise, does not.
Declared In
TiApp.h
startNetwork
Tells application to show network activity indicator.
- (void)startNetwork
Discussion
Every call of startNetwork should be paired with stopNetwork.
See Also
Declared In
TiApp.h
stopNetwork
Tells application to hide network activity indicator.
- (void)stopNetwork
Discussion
Every call of stopNetwork should have corresponding startNetwork call.
See Also
Declared In
TiApp.h