Skip to content

Commit

Permalink
调整
Browse files Browse the repository at this point in the history
  • Loading branch information
gsdios committed May 4, 2016
1 parent 0638ce4 commit a5254d2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Binary file not shown.
6 changes: 3 additions & 3 deletions SDAutoLayoutDemo/SDAutoLayout/UIView+SDAutoLayout.m
Original file line number Diff line number Diff line change
Expand Up @@ -1377,18 +1377,18 @@ + (void)load
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
NSString *selString = @"layoutSubviews";
NSString *mySelString = [@"sd_" stringByAppendingString:selString];
NSString *mySelString = [@"sd_button_" stringByAppendingString:selString];

Method originalMethod = class_getInstanceMethod(self, NSSelectorFromString(selString));
Method myMethod = class_getInstanceMethod(self, NSSelectorFromString(mySelString));
method_exchangeImplementations(originalMethod, myMethod);
});
}

- (void)sd_layoutSubviews
- (void)sd_button_layoutSubviews
{
// 如果程序崩溃在这行代码说明是你的view在执行“layoutSubvies”方法时出了问题而不是在此自动布局库内部出现了问题,请检查你的“layoutSubvies”方法
[self sd_layoutSubviews];
[self sd_button_layoutSubviews];

[self sd_layoutSubviewsHandle];

Expand Down

0 comments on commit a5254d2

Please sign in to comment.