UIViewController+AppearLog.m 639 Bytes
Newer Older
lee committed
1 2 3 4 5 6 7 8 9
//
//  UIViewController+AppearLog.m
//  iCemarose
//
//  Created by lee on 2017/5/18.
//  Copyright © 2017年 kollway. All rights reserved.
//

#import "UIViewController+AppearLog.h"
10
#import <Aspects/Aspects.h>
lee committed
11 12

@implementation UIViewController (AppearLog)
lee committed
13
#if DEBUG || 1
lee committed
14 15
+ (void)load
{
16 17 18 19 20
    [self aspect_hookSelector:@selector(viewWillAppear:) withOptions:AspectPositionInstead usingBlock:^(id<AspectInfo> info, BOOL animated) {
        NSInvocation *invocation = info.originalInvocation;
        NSLog(@"logViewWillAppear: %@",NSStringFromClass([invocation.target class]));
        [invocation invoke];
    } error:nil];
lee committed
21 22
}

lee committed
23
#endif
lee committed
24
@end
lee committed
25