Commit b01766cd authored by 汪洋's avatar 汪洋

showLoad参数可为nil;埋点pageName容错处理:为nil时返回空字符串

parent 8e359296
...@@ -8,12 +8,13 @@ ...@@ -8,12 +8,13 @@
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
#import <MBProgressHUD/MBProgressHUD.h> #import <MBProgressHUD/MBProgressHUD.h>
NS_ASSUME_NONNULL_BEGIN
@interface UIViewController (HUD) @interface UIViewController (HUD)
/** /**
* @brief 显示加载动画 * @brief 显示加载动画
* @param text 加载动画文字 * @param text 加载动画文字
*/ */
- (void)showLoading:(NSString *) text; - (void)showLoading:(nullable NSString *)text;
/** /**
* @brief 显示隐藏加载 * @brief 显示隐藏加载
...@@ -42,3 +43,4 @@ ...@@ -42,3 +43,4 @@
- (void)toastInView:(NSString *)text; - (void)toastInView:(NSString *)text;
@end @end
NS_ASSUME_NONNULL_END
\ No newline at end of file
...@@ -184,7 +184,8 @@ ...@@ -184,7 +184,8 @@
} }
- (NSString *)pageName { - (NSString *)pageName {
return objc_getAssociatedObject(self, @selector(pageName)); NSString *name = objc_getAssociatedObject(self, @selector(pageName));
return name == nil ? @"" : name;
} }
- (void)setPageName:(NSString *)pageName { - (void)setPageName:(NSString *)pageName {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment