From d3cd3058b0ce91e42a14a64ace8e138382876b27 Mon Sep 17 00:00:00 2001 From: "dengwu.wangdw" Date: Sun, 30 Mar 2014 22:51:21 +0800 Subject: [PATCH 1/5] addObserver UIApplicationDidFinishLaunchingNotification auto start so don't need [iOSHierarchyViewer start] at applicationDidBecomeActive --- iOSViewHierarchy/iOSHierarchyViewer.m | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/iOSViewHierarchy/iOSHierarchyViewer.m b/iOSViewHierarchy/iOSHierarchyViewer.m index 83b1ee6..870ec24 100644 --- a/iOSViewHierarchy/iOSHierarchyViewer.m +++ b/iOSViewHierarchy/iOSHierarchyViewer.m @@ -5,6 +5,7 @@ // #import +#import #import #import #import @@ -30,6 +31,22 @@ @implementation iOSHierarchyViewer static HVHTTPServer *server = nil; static HVCoreDataHandler *coreDataHandler = nil; +//addObserver UIApplicationDidFinishLaunchingNotification auto start +//don't need [iOSHierarchyViewer start] at applicationDidBecomeActive +//add by dengwu.wangdw ++(void)load{ + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(doStart) name:UIApplicationDidFinishLaunchingNotification object:nil]; +} + ++(void)doStart{ + [iOSHierarchyViewer start]; +} + +-(void)dealloc{ + [super dealloc]; + [[NSNotificationCenter defaultCenter] removeObserver:self]; +} + + (void)logServiceAdresses { struct ifaddrs *interfaces = NULL; From 2ab9ea49d5f3b81624d3f454a8d77ade033db6d4 Mon Sep 17 00:00:00 2001 From: wangdengwu Date: Sun, 30 Mar 2014 23:17:44 +0800 Subject: [PATCH 2/5] Create iOS-Hierarchy-Viewer.podspec --- iOS-Hierarchy-Viewer.podspec | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 iOS-Hierarchy-Viewer.podspec diff --git a/iOS-Hierarchy-Viewer.podspec b/iOS-Hierarchy-Viewer.podspec new file mode 100644 index 0000000..9340bbc --- /dev/null +++ b/iOS-Hierarchy-Viewer.podspec @@ -0,0 +1,21 @@ +Pod::Spec.new do |s| + s.name = "iOS-Hierarchy-Viewer" + s.version = "1.4.7" + s.summary = "Allows to debug user interfaces with a real time preview of the UIViews hierarchy." + s.description = "iOS Hierarchy Viewer allows developers to debug their user interfaces. If there are problems with layout calculations, it will catch them by giving a real time preview of the UIViews hierarchy." \ + "Features:" \ + "- the client is implemented in HTML/JS/CSS. Additional software is not required." \ + "- preview of device/simulator screen. Can be scaled and/or rotated on demand." \ + "- debug frames shows the exact UIViews frames." \ + "- property list shows obj-c properties and their values for selected UIView." + s.homepage = "https://github.com/glock45/iOS-Hierarchy-Viewer" + s.license = { :type => 'BSD' } + s.author = { "Damian Kołakowski" => "kolakowski.damian@gmail.com" } + s.frameworks = 'CFNetwork', 'QuartzCore' + s.source = { :git => "https://github.com/glock45/iOS-Hierarchy-Viewer.git"} + s.compiler_flags = '-ObjC' + s.platform = :ios + s.source_files = 'iOSViewHierarchy/**/*.{h,m}' + s.exclude_files = '**/*json*' + # s.preserve_paths = "AUTHORS.txt" +end From a1de169189c63580d4797fc027a1c91e3561994c Mon Sep 17 00:00:00 2001 From: wangdengwu Date: Sun, 30 Mar 2014 23:18:23 +0800 Subject: [PATCH 3/5] Update iOS-Hierarchy-Viewer.podspec --- iOS-Hierarchy-Viewer.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iOS-Hierarchy-Viewer.podspec b/iOS-Hierarchy-Viewer.podspec index 9340bbc..b75ea3f 100644 --- a/iOS-Hierarchy-Viewer.podspec +++ b/iOS-Hierarchy-Viewer.podspec @@ -12,7 +12,7 @@ Pod::Spec.new do |s| s.license = { :type => 'BSD' } s.author = { "Damian Kołakowski" => "kolakowski.damian@gmail.com" } s.frameworks = 'CFNetwork', 'QuartzCore' - s.source = { :git => "https://github.com/glock45/iOS-Hierarchy-Viewer.git"} + s.source = { :git => "https://github.com/wangdengwu/iOS-Hierarchy-Viewer.git"} s.compiler_flags = '-ObjC' s.platform = :ios s.source_files = 'iOSViewHierarchy/**/*.{h,m}' From 0d6fbe0f44f40f68d001a5817499e58d862859a1 Mon Sep 17 00:00:00 2001 From: "dengwu.wangdw" Date: Mon, 31 Mar 2014 09:55:51 +0800 Subject: [PATCH 4/5] remove +doStart just use +start --- iOSViewHierarchy/iOSHierarchyViewer.m | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/iOSViewHierarchy/iOSHierarchyViewer.m b/iOSViewHierarchy/iOSHierarchyViewer.m index 870ec24..d96105a 100644 --- a/iOSViewHierarchy/iOSHierarchyViewer.m +++ b/iOSViewHierarchy/iOSHierarchyViewer.m @@ -31,15 +31,11 @@ @implementation iOSHierarchyViewer static HVHTTPServer *server = nil; static HVCoreDataHandler *coreDataHandler = nil; -//addObserver UIApplicationDidFinishLaunchingNotification auto start -//don't need [iOSHierarchyViewer start] at applicationDidBecomeActive -//add by dengwu.wangdw +/// addObserver UIApplicationDidFinishLaunchingNotification auto start +/// so don't need [iOSHierarchyViewer start] at applicationDidBecomeActive +/// added by dengwu.wang +(void)load{ - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(doStart) name:UIApplicationDidFinishLaunchingNotification object:nil]; -} - -+(void)doStart{ - [iOSHierarchyViewer start]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(start) name:UIApplicationDidFinishLaunchingNotification object:nil]; } -(void)dealloc{ From a15b5aa8eb31c725b0fb3d775fb523af8fa2970e Mon Sep 17 00:00:00 2001 From: wangdengwu Date: Mon, 31 Mar 2014 10:11:07 +0800 Subject: [PATCH 5/5] Delete iOS-Hierarchy-Viewer.podspec --- iOS-Hierarchy-Viewer.podspec | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 iOS-Hierarchy-Viewer.podspec diff --git a/iOS-Hierarchy-Viewer.podspec b/iOS-Hierarchy-Viewer.podspec deleted file mode 100644 index b75ea3f..0000000 --- a/iOS-Hierarchy-Viewer.podspec +++ /dev/null @@ -1,21 +0,0 @@ -Pod::Spec.new do |s| - s.name = "iOS-Hierarchy-Viewer" - s.version = "1.4.7" - s.summary = "Allows to debug user interfaces with a real time preview of the UIViews hierarchy." - s.description = "iOS Hierarchy Viewer allows developers to debug their user interfaces. If there are problems with layout calculations, it will catch them by giving a real time preview of the UIViews hierarchy." \ - "Features:" \ - "- the client is implemented in HTML/JS/CSS. Additional software is not required." \ - "- preview of device/simulator screen. Can be scaled and/or rotated on demand." \ - "- debug frames shows the exact UIViews frames." \ - "- property list shows obj-c properties and their values for selected UIView." - s.homepage = "https://github.com/glock45/iOS-Hierarchy-Viewer" - s.license = { :type => 'BSD' } - s.author = { "Damian Kołakowski" => "kolakowski.damian@gmail.com" } - s.frameworks = 'CFNetwork', 'QuartzCore' - s.source = { :git => "https://github.com/wangdengwu/iOS-Hierarchy-Viewer.git"} - s.compiler_flags = '-ObjC' - s.platform = :ios - s.source_files = 'iOSViewHierarchy/**/*.{h,m}' - s.exclude_files = '**/*json*' - # s.preserve_paths = "AUTHORS.txt" -end