diff --git a/iOSViewHierarchy/iOSHierarchyViewer.m b/iOSViewHierarchy/iOSHierarchyViewer.m index 83b1ee6..d96105a 100644 --- a/iOSViewHierarchy/iOSHierarchyViewer.m +++ b/iOSViewHierarchy/iOSHierarchyViewer.m @@ -5,6 +5,7 @@ // #import +#import #import #import #import @@ -30,6 +31,18 @@ @implementation iOSHierarchyViewer static HVHTTPServer *server = nil; static HVCoreDataHandler *coreDataHandler = nil; +/// addObserver UIApplicationDidFinishLaunchingNotification auto start +/// so don't need [iOSHierarchyViewer start] at applicationDidBecomeActive +/// added by dengwu.wang ++(void)load{ + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(start) name:UIApplicationDidFinishLaunchingNotification object:nil]; +} + +-(void)dealloc{ + [super dealloc]; + [[NSNotificationCenter defaultCenter] removeObserver:self]; +} + + (void)logServiceAdresses { struct ifaddrs *interfaces = NULL;