Authored by hongyong.zhao

修改页面加载字段名称,及方式

... ... @@ -89,7 +89,7 @@ typedef NS_OPTIONS(NSInteger, YHEventReportTrackType) {
};
typedef NS_ENUM(NSInteger, YHEventReportPointName) {
YHPN_VIEWCONTROLLER, //UIViewController 加载时间 // @"PAGE"
YHPN_VIEWCONTROLLER, //UIViewController 加载时间 // @"PAGEMETRICS"
YHPN_WEBVIEW,//UIWebView 加载时间 // @"WEBVIEW"
YHPN_IMAGEVIEW,//Image (SDWebImage) 加载时间 // @"IMAGE"
YHPN_BUTTON,//Button 响应时间 // @"BUTTON"
... ...
... ... @@ -140,7 +140,7 @@
NSString *str = @"";
switch (pointName) {
case YHPN_VIEWCONTROLLER:
str = @"PAGE";
str = @"PAGEMETRICS";
break;
case YHPH_HTTPMETRICS:
str = @"HTTPMETRICS";
... ...
... ... @@ -119,7 +119,15 @@
-(void)yher_viewDidAppear:(BOOL)animated {
@try {
if (self.shouldTrack && !self.yher_hasReported) {
[[YH_EventCollector sharedInstance] timeEventEndWithViewController:self];
CFRunLoopRef mainrunloop = CFRunLoopGetMain();
CFStringRef runLoopMode = kCFRunLoopDefaultMode;
CFRunLoopObserverRef observer = CFRunLoopObserverCreateWithHandler(kCFAllocatorDefault, kCFRunLoopBeforeWaiting, true, 0, ^(CFRunLoopObserverRef observer, CFRunLoopActivity activity) {
[[YH_EventCollector sharedInstance] timeEventEndWithViewController:self];
CFRunLoopRemoveObserver(mainrunloop, observer, runLoopMode);
});
CFRunLoopAddObserver(mainrunloop, observer, runLoopMode);
CFRelease(observer);
}
if ([YHEventReport sharedInstance].isAppCrashReportEnable && [YHEventReport sharedInstance].isAutoTrackEnabled) {
... ...