BaseViewController.h 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  1. //
  2. // BaseViewController.h
  3. // IBOSS
  4. //
  5. // Created by iHope on 14-7-7.
  6. // Copyright (c) 2014年 elongtian. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. #import "CommonCrypto/CommonDigest.h"
  10. #import "UserInfoManager.h"
  11. #import "sys/utsname.h"
  12. #import "NewMBProgressHUD.h"
  13. @interface BaseViewController : UIViewController{
  14. // 标题
  15. UILabel *mlbTitle;
  16. // 进度条
  17. MBProgressHUD *mLoadView;
  18. // 进度条
  19. NewMBProgressHUD *_mNewLoadView;
  20. // logo
  21. UIImageView *mLogoView;
  22. }
  23. // 进度条
  24. @property (nonatomic,strong) MBProgressHUD *hud;
  25. // 加载消息
  26. @property (nonatomic, retain) NSString *mLoadMsg;
  27. // 代理
  28. @property (nonatomic, assign) id delegate;
  29. // 返回sel
  30. @property (nonatomic, assign) SEL OnGoBack;
  31. //topbar
  32. @property (nonatomic, readonly) UILabel *mlbTitle;
  33. @property (nonatomic, retain) UIColor *mTitleColor;
  34. @property (nonatomic, retain) UIColor *mTopColor;
  35. @property (nonatomic, retain) UIImage *mTopImage;
  36. @property (nonatomic, assign) BOOL mbLightNav;
  37. @property (nonatomic, assign) int mFontSize;
  38. //@property(nonatomic, strong) id<FollowUpBrowseProtocol> refreshDelegate;
  39. /**
  40. ip地址
  41. @return <#return value description#>
  42. */
  43. - (NSString *)IPAddress;
  44. /**
  45. 将数据转换成字符串
  46. @param arr <#arr description#>
  47. @return <#return value description#>
  48. */
  49. - (NSString *)getArrToString:(NSArray *)arr;
  50. /**
  51. md5加密
  52. @param str <#str description#>
  53. @return <#return value description#>
  54. */
  55. - (NSString *) md5:(NSString *)str;
  56. /**
  57. 设备信息
  58. */
  59. - (void)getDeviceAndOSInfo;
  60. /**
  61. 进度条加载中。。。。
  62. */
  63. - (void)showLoading;
  64. /**
  65. 进度条隐藏
  66. */
  67. - (void)hideLoading;
  68. /**
  69. 标题
  70. @param text <#text description#>
  71. */
  72. - (void)showTitle:(NSString*)text;
  73. /**
  74. 标题
  75. @param text <#text description#>
  76. @param nav <#nav description#>
  77. */
  78. - (void)showTitle:(NSString*)text navi:(UINavigationController*)nav;
  79. /**
  80. 文本加载中
  81. @param text <#text description#>
  82. */
  83. - (void)showLoadingText:(NSString*)text;
  84. /**
  85. 显示消息
  86. @param text <#text description#>
  87. */
  88. - (void)showAlertViewText:(NSString *)text;
  89. /**
  90. 显示消息
  91. @param text <#text description#>
  92. */
  93. - (void)showAlertViewBackText:(NSString *)text;
  94. /**
  95. 返回按钮事件
  96. */
  97. - (void)goBack;
  98. /**
  99. 回到主页
  100. */
  101. - (void)goHome;
  102. /**
  103. 加载进度条开始
  104. */
  105. - (void)startLoading;
  106. /**
  107. 进度条结束
  108. */
  109. - (void)stopLoading;
  110. /**
  111. 加载进度条开始
  112. */
  113. - (void)startNewLoading;
  114. /**
  115. 进度条结束
  116. */
  117. - (void)stopNewLoading;
  118. /**
  119. 显示消息
  120. @param msg <#msg description#>
  121. */
  122. - (void)showMsg:(NSString *)msg;
  123. /**
  124. 隐藏logo
  125. */
  126. - (void)hideLogo;
  127. /**
  128. 显示logo
  129. @param iOffset <#iOffset description#>
  130. */
  131. - (void)showLogo:(int)iOffset;
  132. /**
  133. 导航栏清空
  134. */
  135. - (void)clearNavItem;
  136. /**
  137. 导航栏右侧文本
  138. @param name <#name description#>
  139. @param target <#target description#>
  140. @param action <#action description#>
  141. */
  142. - (void)addRightTextBtn:(NSString *)name target:(id)target action:(SEL)action;
  143. /**
  144. 航栏右侧图片
  145. @param image <#image description#>
  146. @param target <#target description#>
  147. @param action <#action description#>
  148. */
  149. - (void)addRightImageBtn:(UIImage *)image target:(id)target action:(SEL)action;
  150. /**
  151. 航栏左侧图片
  152. @param image <#image description#>
  153. @param target <#target description#>
  154. @param action <#action description#>
  155. */
  156. - (void)addLeftImageBtn:(UIImage *)image target:(id)target action:(SEL)action;
  157. /**
  158. 图片按钮
  159. @param image <#image description#>
  160. @param target <#target description#>
  161. @param action <#action description#>
  162. @return <#return value description#>
  163. */
  164. - (UIButton *)getImageButton:(UIImage *)image target:(id)target action:(SEL)action;
  165. /**
  166. UIBarButtonItem
  167. @param image <#image description#>
  168. @param target <#target description#>
  169. @param action <#action description#>
  170. @return <#return value description#>
  171. */
  172. - (UIBarButtonItem *)getImageBarItem:(UIImage *)image target:(id)target action:(SEL)action;
  173. /**
  174. 航栏右侧图片数组
  175. @param array <#array description#>
  176. */
  177. - (void)addRightImageBtns:(NSArray *)array;
  178. /**
  179. 刷新导航单颜色
  180. */
  181. - (void)refreshNavColor;
  182. /**
  183. uiview
  184. @return <#return value description#>
  185. */
  186. - (UIView *)getInputAccessoryView;
  187. /**
  188. 异常登录
  189. */
  190. - (void)showReLoginDialog;
  191. /**
  192. 异常登录
  193. @param message <#message description#>
  194. */
  195. - (void)showReLoginDialog:(NSString *)message ;
  196. /**
  197. 无数据的view
  198. @param frame <#frame description#>
  199. @return <#return value description#>
  200. */
  201. - (UIView *)noDataViewByFrame:(CGRect)frame;
  202. /**
  203. 背景提示布局
  204. @param frame <#frame description#>
  205. @param str <#str description#>
  206. @return <#return value description#>
  207. */
  208. - (UIView *)backGroundPromptViewByFrame:(CGRect)frame promptStr:(NSString *)str;
  209. @end