FileManager.m
上传用户:xy800802
上传日期:2020-12-29
资源大小:194k
文件大小:1k
源码类别:

iPhone

开发平台:

Objective-C

  1. #import "FileManager.h"
  2. #import "MainView.h"
  3. @implementation FileManager
  4. // 程序加载完毕
  5. - (void) applicationDidFinishLaunching: (id) unused
  6. {
  7. NSLog(@"Launching ...");
  8. CGRect windowRect = [ UIHardware fullScreenApplicationContentRect ];
  9.     window =  [[UIWindow alloc] initWithContentRect: windowRect];
  10. CGRect viewRect = [ UIHardware fullScreenApplicationContentRect ];
  11. viewRect.origin.x = viewRect.origin.y = 0.0f;
  12. mainView = [ [ MainView alloc ] initWithFrame: viewRect ];
  13. [ window setContentView: mainView ];
  14.     [ window orderFront: self ];
  15.     [ window makeKey: self ];
  16.     [ window _setHidden: NO ];
  17. NSLog(@"Launching Finish!");
  18. }
  19. // 屏幕锁定
  20. - (void)applicationWillSuspendUnderLock:(struct __GSEvent *)event
  21. {
  22. }
  23. // 被电话等事件中断
  24. - (void)applicationWillSuspendForEventsOnly:(struct __GSEvent *)event
  25. {
  26. }
  27. // home 按钮按下(及所有中断的最终处理)
  28. - (void)applicationSuspend:(struct __GSEvent *)event
  29. {
  30. [ self terminate ];
  31. }
  32. // 屏幕解锁
  33. - (void)applicationDidResumeFromUnderLock:(struct __GSEvent *)event
  34. {
  35. }
  36. // 从中断事件中恢复(接完电话)
  37. - (void)applicationDidResumeForEventsOnly:(struct __GSEvent *)event
  38. {
  39. }
  40. // 状态恢复(从所有中断中恢复)
  41. - (void)applicationDidResume:(struct __GSEvent *)event
  42. {
  43. }
  44. // 程序结束
  45. - (void)applicationWillTerminate
  46. {
  47. }
  48. @end