- NS_CLASS_AVAILABLE_IOS(2_0) @interface UIApplication : UIResponder <UIActionSheetDelegate> 本文转载至 http://blog.youkuaiyun.com/jpcfei/article/details/9000273
- {
- //获取UIApplication单例对象
- + (UIApplication *)sharedApplication;
- //应用程序委托对象
- @property(nonatomic,assign) id<UIApplicationDelegate> delegate;
- - (void)beginIgnoringInteractionEvents; // nested. set should be set during animations & transitions to ignore touch and other events
- - (void)endIgnoringInteractionEvents;
- - (BOOL)isIgnoringInteractionEvents; // returns YES if we are at least one deep in ignoring events
- //IOS用一个布尔值用来控制是否取消应用程序空闲时间,既idleTimerDisabled。这个值的默认属性是'NO'。当大多数应用程序没有接收到用户输入信息的时候,
- //系统会把设备设置成“休眠”状态,屏幕也会变暗。这样做是为了保存更多电量。事实上,应用程序在运行大部分的App的时候是不需要用户输入的,如果想保证屏
- //幕长亮,请把这个变量设置为'YES',来取消系统休眠的“空闲时间”。
- @property(nonatomic,getter=isIdleTimerDisabled) BOOL idleTimerDisabled; // default is NO
- - (BOOL)openURL:(NSURL*)url;
- - (BOOL)canOpenURL:(NSURL *)url NS_AVAILABLE_IOS(3_0);
- - (void)sendEvent:(UIEvent *)event;
- //获取当前程序关键窗口
- @property(nonatomic,readonly) UIWindow *keyWindow;
- //获取当前程序涉及到窗口类数组
- @property(nonatomic,readonly) NSArray *windows;
- - (BOOL)sendAction:(SEL)action to:(id)target from:(id)sender forEvent:(UIEvent *)event;
- //状态栏显示网络标志
- @property(nonatomic,getter=isNetworkActivityIndicatorVisible) BOOL networkActivityIndicatorVisible; // showing network spinning gear in status bar. default is NO
- //状态栏的显示风格
- @property(nonatomic) UIStatusBarStyle statusBarStyle; // default is UIStatusBarStyleDefault
- - (void)setStatusBarStyle:(UIStatusBarStyle)statusBarStyle animated:(BOOL)animated;
- @property(nonatomic,getter=isStatusBarHidden) BOOL statusBarHidden;
- - (void)setStatusBarHidden:(BOOL)hidden withAnimation:(UIStatusBarAnimation)animation NS_AVAILABLE_IOS(3_2);
- // Rotate to a specific orientation. This only rotates the status bar and updates the statusBarOrientation property.
- // This does not change automatically if the device changes orientation.
- // Explicit setting of the status bar orientation is more limited in iOS 6.0 and later.
- //状态栏方向
- @property(nonatomic) UIInterfaceOrientation statusBarOrientation;
- - (void)setStatusBarOrientation:(UIInterfaceOrientation)interfaceOrientation animated:(BOOL)animated;
- // The system only calls this method if the application delegate has not
- // implemented the delegate equivalent. It returns the orientations specified by
- // the application's info.plist. If no supported interface orientations were
- // specified it will return UIInterfaceOrientationMaskAll on an iPad and
- // UIInterfaceOrientationMaskAllButUpsideDown on a phone. The return value
- // should be one of the UIInterfaceOrientationMask values which indicates the
- // orientations supported by this application.
- - (NSUInteger)supportedInterfaceOrientationsForWindow:(UIWindow *)window NS_AVAILABLE_IOS(6_0);
- @property(nonatomic,readonly) NSTimeInterval statusBarOrientationAnimationDuration; // Returns the animation duration for the status bar during a 90 degree orientation change. It should be doubled for a 180 degree orientation change.
- @property(nonatomic,readonly) CGRect statusBarFrame; // returns CGRectZero if the status bar is hidden
- @property(nonatomic) NSInteger applicationIconBadgeNumber; // set to 0 to hide. default is 0
- @property(nonatomic) BOOL applicationSupportsShakeToEdit NS_AVAILABLE_IOS(3_0);
- @property(nonatomic,readonly) UIApplicationState applicationState NS_AVAILABLE_IOS(4_0);
- @property(nonatomic,readonly) NSTimeInterval backgroundTimeRemaining NS_AVAILABLE_IOS(4_0);
- - (UIBackgroundTaskIdentifier)beginBackgroundTaskWithExpirationHandler:(void(^)(void))handler NS_AVAILABLE_IOS(4_0);
- - (void)endBackgroundTask:(UIBackgroundTaskIdentifier)identifier NS_AVAILABLE_IOS(4_0);
- - (BOOL)setKeepAliveTimeout:(NSTimeInterval)timeout handler:(void(^)(void))keepAliveHandler NS_AVAILABLE_IOS(4_0);
- - (void)clearKeepAliveTimeout NS_AVAILABLE_IOS(4_0);
- @property(nonatomic,readonly,getter=isProtectedDataAvailable) BOOL protectedDataAvailable NS_AVAILABLE_IOS(4_0);
- @property(nonatomic,readonly) UIUserInterfaceLayoutDirection userInterfaceLayoutDirection NS_AVAILABLE_IOS(5_0);
- @end
转载于:https://www.cnblogs.com/Camier-myNiuer/archive/2013/06/05/3118731.html