UIApplication

  1. NS_CLASS_AVAILABLE_IOS(2_0) @interface UIApplication : UIResponder <UIActionSheetDelegate>     本文转载至 http://blog.csdn.net/jpcfei/article/details/9000273
  2. {  
  3.   
  4. //获取UIApplication单例对象  
  5. + (UIApplication *)sharedApplication;  
  6.   
  7. //应用程序委托对象  
  8. @property(nonatomic,assign) id<UIApplicationDelegate> delegate;  
  9.   
  10. - (void)beginIgnoringInteractionEvents;               // nested. set should be set during animations & transitions to ignore touch and other events  
  11. - (void)endIgnoringInteractionEvents;  
  12. - (BOOL)isIgnoringInteractionEvents;                  // returns YES if we are at least one deep in ignoring events  
  13.   
  14. //IOS用一个布尔值用来控制是否取消应用程序空闲时间,既idleTimerDisabled。这个值的默认属性是'NO'。当大多数应用程序没有接收到用户输入信息的时候,  
  15. //系统会把设备设置成“休眠”状态,屏幕也会变暗。这样做是为了保存更多电量。事实上,应用程序在运行大部分的App的时候是不需要用户输入的,如果想保证屏  
  16. //幕长亮,请把这个变量设置为'YES',来取消系统休眠的“空闲时间”。  
  17. @property(nonatomic,getter=isIdleTimerDisabled)       BOOL idleTimerDisabled;     // default is NO  
  18.   
  19. - (BOOL)openURL:(NSURL*)url;  
  20. - (BOOL)canOpenURL:(NSURL *)url NS_AVAILABLE_IOS(3_0);  
  21.   
  22. - (void)sendEvent:(UIEvent *)event;  
  23.   
  24. //获取当前程序关键窗口  
  25. @property(nonatomic,readonly) UIWindow *keyWindow;  
  26.   
  27. //获取当前程序涉及到窗口类数组  
  28. @property(nonatomic,readonly) NSArray  *windows;  
  29.   
  30. - (BOOL)sendAction:(SEL)action to:(id)target from:(id)sender forEvent:(UIEvent *)event;  
  31.   
  32. //状态栏显示网络标志  
  33. @property(nonatomic,getter=isNetworkActivityIndicatorVisible) BOOL networkActivityIndicatorVisible; // showing network spinning gear in status bar. default is NO  
  34.   
  35. //状态栏的显示风格  
  36. @property(nonatomic) UIStatusBarStyle statusBarStyle; // default is UIStatusBarStyleDefault  
  37. - (void)setStatusBarStyle:(UIStatusBarStyle)statusBarStyle animated:(BOOL)animated;  
  38.   
  39. @property(nonatomic,getter=isStatusBarHidden) BOOL statusBarHidden;  
  40. - (void)setStatusBarHidden:(BOOL)hidden withAnimation:(UIStatusBarAnimation)animation NS_AVAILABLE_IOS(3_2);  
  41.   
  42. // Rotate to a specific orientation.  This only rotates the status bar and updates the statusBarOrientation property.  
  43. // This does not change automatically if the device changes orientation.  
  44. // Explicit setting of the status bar orientation is more limited in iOS 6.0 and later.  
  45.   
  46. //状态栏方向  
  47. @property(nonatomic) UIInterfaceOrientation statusBarOrientation;  
  48. - (void)setStatusBarOrientation:(UIInterfaceOrientation)interfaceOrientation animated:(BOOL)animated;  
  49.   
  50. // The system only calls this method if the application delegate has not  
  51. // implemented the delegate equivalent. It returns the orientations specified by  
  52. // the application's info.plist. If no supported interface orientations were  
  53. // specified it will return UIInterfaceOrientationMaskAll on an iPad and  
  54. // UIInterfaceOrientationMaskAllButUpsideDown on a phone.  The return value  
  55. // should be one of the UIInterfaceOrientationMask values which indicates the  
  56. // orientations supported by this application.  
  57. - (NSUInteger)supportedInterfaceOrientationsForWindow:(UIWindow *)window NS_AVAILABLE_IOS(6_0);  
  58.   
  59. @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.  
  60. @property(nonatomic,readonly) CGRect statusBarFrame; // returns CGRectZero if the status bar is hidden  
  61.   
  62. @property(nonatomic) NSInteger applicationIconBadgeNumber;  // set to 0 to hide. default is 0  
  63.   
  64. @property(nonatomic) BOOL applicationSupportsShakeToEdit NS_AVAILABLE_IOS(3_0);  
  65.   
  66. @property(nonatomic,readonly) UIApplicationState applicationState NS_AVAILABLE_IOS(4_0);  
  67. @property(nonatomic,readonly) NSTimeInterval backgroundTimeRemaining NS_AVAILABLE_IOS(4_0);  
  68.   
  69. - (UIBackgroundTaskIdentifier)beginBackgroundTaskWithExpirationHandler:(void(^)(void))handler  NS_AVAILABLE_IOS(4_0);  
  70. - (void)endBackgroundTask:(UIBackgroundTaskIdentifier)identifier NS_AVAILABLE_IOS(4_0);  
  71.   
  72. - (BOOL)setKeepAliveTimeout:(NSTimeInterval)timeout handler:(void(^)(void))keepAliveHandler NS_AVAILABLE_IOS(4_0);  
  73. - (void)clearKeepAliveTimeout NS_AVAILABLE_IOS(4_0);  
  74.   
  75. @property(nonatomic,readonly,getter=isProtectedDataAvailable) BOOL protectedDataAvailable NS_AVAILABLE_IOS(4_0);  
  76.   
  77. @property(nonatomic,readonly) UIUserInterfaceLayoutDirection userInterfaceLayoutDirection NS_AVAILABLE_IOS(5_0);  
  78.   
  79. @end  
posted @ 2013-06-05 13:02  天牛  阅读(474)  评论(0)    收藏  举报