AppDelegate.h 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. /**
  2. /Users/apple/Desktop/draft/jiaPei/jiaPei/AppDelegate.h
  3. */
  4. #import <UIKit/UIKit.h>
  5. #import "RQNavigationControllerStack.h"
  6. #import "RQViewModelServicesImpl.h"
  7. #import "RQAppDelegate.h"
  8. //为了保留计时页面不被内存清掉
  9. #import "PeriodVC.h"
  10. #import "ShiCaoPeriodVC.h"
  11. //进入后台相关
  12. #import "LocationTracker.h"
  13. //语音
  14. #import <AVFoundation/AVFoundation.h>z
  15. #import "MNQtTrainVC.h"
  16. /// 百度地图
  17. #define BaiDuMapAK @"RYL8cEtkNVavzRymDA06avNyaAmhNArO"
  18. #define RQ_APPDELEGATE [AppDelegate sharedDelegate]
  19. @interface AppDelegate : RQAppDelegate
  20. /// 窗口
  21. @property (strong, nonatomic) UIWindow *window;
  22. @property (strong, nonatomic) UIWindow *splashWindow;
  23. /// APP管理的导航栏的堆栈
  24. @property (nonatomic, readonly, strong) RQNavigationControllerStack *navigationControllerStack;
  25. /// APP的服务层
  26. @property (nonatomic, readonly, strong) RQViewModelServicesImpl *services;
  27. /// 获取AppDelegate
  28. + (AppDelegate *)sharedDelegate;
  29. /// 是否已经弹出键盘 主要用于微信朋友圈的判断
  30. @property (nonatomic, readwrite, assign , getter = isShowKeyboard) BOOL showKeyboard;
  31. /**1顺序,2随机,3章节,4错题,5强化,6排除,7收藏,8背题,9考试 10未做题 11 新规题
  32. */
  33. @property (strong, nonatomic) NSString *type; //区别不同练习
  34. /**@"1"表示科目一。4表示科目4。没有科23.
  35. 2,3用的是urlType(倒2)
  36. */
  37. @property (strong, nonatomic) NSString *subject; //科目
  38. @property (strong, nonatomic) NSString *where; //获取题目条件
  39. @property (strong, nonatomic) NSString *identifyNum;//学员身份证号
  40. @property (strong, nonatomic) NSString *stuId; //学员ID
  41. @property BOOL isLogin; //判断是否登录
  42. @property BOOL isTrain; //判断计时器是否计时
  43. @property BOOL isUseriPhone;//判断启用计时练习
  44. @property (nonatomic,assign)BOOL isNightMode; //是否设置夜间模式
  45. @property (nonatomic,assign)BOOL isNotSoundMode; //是否无声模式
  46. @property (strong, nonatomic) NSString *begin_Time;//训练开始时间
  47. @property (nonatomic, assign) NSInteger optionFont;//题目、选项、及解释的字体大小
  48. //等题库刷新后 查询出错题数
  49. @property (nonatomic, strong) NSMutableArray *faultArray;
  50. //是否是同步过来然后进入主页的
  51. @property (nonatomic, assign) BOOL isSyn;
  52. // 本地广告是否已经展示
  53. @property (nonatomic, assign) BOOL adIsShow;
  54. //更新数据库的时候 存放原有库表grade数据。 考试成绩
  55. @property (nonatomic, strong) NSMutableArray *gradeTableData;
  56. //更新数据库的时候 存放原有库表markQuestion数据 错题排除收藏
  57. @property (nonatomic, strong) NSMutableArray *markQuestionTableData;
  58. /**
  59. 就是为了。从chooseVC传值给leftVC用的题库名。
  60. */
  61. //@property (strong, nonatomic) NSString *libName;
  62. @property (strong, nonatomic) NSString *url; //学车参考
  63. @property (strong, nonatomic) NSString *urlType;//学车参考类型
  64. /**学员计时用的。进入后台后,会终止计时。 所有的计时都用这个定时器吧 因为都是离开的时候暂停 回来打开
  65. */
  66. @property (strong, nonatomic) NSTimer* timer;
  67. //将理论计时页面放在这里 然后定时器也在这里面
  68. @property (strong, nonatomic) PeriodVC *tPeriodVC;
  69. //将实操计时页面放在这里 然后定时器也在这里面
  70. @property (strong, nonatomic) ShiCaoPeriodVC *scPeriodVC;
  71. /**APNS的TOKEN
  72. */
  73. @property (strong, nonatomic) NSString* token;
  74. /**保存从picker里面选取的img
  75. */
  76. @property (strong,nonatomic) NSMutableArray* pickImgs;
  77. /**保存RGCardViewLayout的offset
  78. */
  79. @property (nonatomic, assign) NSInteger layoutIndex;
  80. /**用户当前经纬
  81. */
  82. @property (nonatomic, retain) NSArray *locationArray;
  83. //将广告存入内存 如果有拿来用 没有就去本地找 都没有 就加载默认图片吧、、
  84. @property (nonatomic, retain) NSArray *adArray;
  85. //嵌入后台相关
  86. @property (nonatomic, assign) BOOL isBackgroundTask;
  87. @property (nonatomic, copy) NSString *backGoundTaskString;
  88. @property (nonatomic, retain) LocationTracker *locationTracker;
  89. @property (nonatomic, retain) NSTimer *locationUpdateTimer;
  90. @property (nonatomic, retain) NSTimer *uploadGPSTimer;
  91. //模拟
  92. /**
  93. Type 定义 0 成功获取学员信息
  94. 1 学员还未在模拟器签到
  95. 2.已在模拟设备登录 未进行人脸比对
  96. 3 无法获取到当前训练科目
  97. 4 隔日签到记录
  98. 5 分钟学时科目异常
  99. */
  100. @property (strong, nonatomic) MNQtTrainVC *mnPeriodVC;
  101. @property (copy, nonatomic) NSString *mnTrainType;
  102. @property(nonatomic, strong) UILabel *trainStateLabel;
  103. //记录当前播放语音 好做关闭处理
  104. @property (retain, nonatomic) AVSpeechSynthesizer *myAudioPlayer;
  105. @property (nonatomic, copy) void (^ backgroundSessionCompletionHandler)(void); // 后台所有下载任务完成回调
  106. @property (nonatomic, assign) BOOL allowOrentitaionRotation;
  107. @end
  108. /**
  109. 单例数据有2种。
  110. 2.用户配置信息,需要长期保存的。
  111. 3.不需要长期保存的。比如:是否计时,开始时间。学车参考,questionType。
  112. <xs:element name="getMyTopicFavs">
  113. */