Skip to content

Commit

Permalink
add new function change distance among layers
Browse files Browse the repository at this point in the history
  • Loading branch information
XcodeYang committed May 25, 2017
1 parent 5e48a45 commit e017b5b
Show file tree
Hide file tree
Showing 14 changed files with 253 additions and 79 deletions.
16 changes: 8 additions & 8 deletions Demo/Pods/Pods.xcodeproj/project.pbxproj

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions Demo/Pods/XYDebugView/XYDebugView.m

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Demo/Pods/XYDebugView/XYDebugView/XYDebugViewManager.m

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions Demo/Pods/XYDebugView/XYDebugWindow.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

119 changes: 91 additions & 28 deletions Demo/Pods/XYDebugView/XYDebugWindow.m

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion XYDebugView.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ s.summary = 'The tool of UIView to Debug its frame'
s.description = <<-DESC
XYDebugView is debug tool to draw the all views frame in device screen and show it by 2d/3d style like reveal did.
DESC
s.version = '0.0.1'
s.version = '0.1.0'
s.homepage = "https://github.com/ZhipingYang/XYDebugView"
s.license = 'MIT'
s.authors = { 'ZhipingYang' => '[email protected]' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,10 @@
@property (nonatomic, copy, readonly) NSArray <UIView *> *debuRecurrenceAllSubviews;

@end

@interface CALayer (XYDebug)

@property (nonatomic, assign) CGFloat debug_zPostion;

@end

21 changes: 20 additions & 1 deletion XYDebugView/UIView+XYDebug.m → XYDebugView/XYDebug+runtime.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//
//

#import "UIView+XYDebug.h"
#import "XYDebug+runtime.h"
#import <objc/runtime.h>

const static char * DebugStoreUIViewBackColor = "DebugStoreUIViewBackColor";
Expand Down Expand Up @@ -84,3 +84,22 @@ - (BOOL)hasStoreDebugColor
}

@end


const static char * DebugStoreZPosition = "DebugStoreZPosition";


@implementation CALayer (XYDebug)

- (CGFloat)debug_zPostion
{
id obj = objc_getAssociatedObject(self, DebugStoreZPosition);
return [obj floatValue];
}

- (void)setDebug_zPostion:(CGFloat)debug_zPostion
{
objc_setAssociatedObject(self, DebugStoreZPosition, @(debug_zPostion), OBJC_ASSOCIATION_ASSIGN);
}

@end
Loading

0 comments on commit e017b5b

Please sign in to comment.