Skip to content

Commit

Permalink
Fix bug that super view maybe can't layout finish sometimes.
Browse files Browse the repository at this point in the history
  • Loading branch information
wyh committed Jun 21, 2018
1 parent 71df57d commit 2cd20b3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion WyhShowEmpty.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Pod::Spec.new do |s|
# Supports git, hg, bzr, svn and HTTP.
#

s.source = { :git => "https://github.com/XiaoWuTongZhi/WyhShowEmpty.git", :tag => "1.0.0" }
s.source = { :git => "https://github.com/XiaoWuTongZhi/WyhShowEmpty.git", :tag => "v1.0.0" }


# ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
Expand Down
5 changes: 5 additions & 0 deletions WyhShowEmpty/UIView+WyhShowEmpty.m
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,11 @@ -(void)setupCoverViewPostionWithStyle:(WyhEmptyStyle *)style{
coverY = -64.0; /* 因为当某些导航栏透明效果影响,tableView的wrapperView起点会偏移64 */
}
}

// Fix masonry-autolayout
[style.superView setNeedsLayout];
[style.superView layoutIfNeeded];

superViewWidth = style.superView.wyh_w;
superViewHeight = style.superView.wyh_h;

Expand Down
12 changes: 6 additions & 6 deletions WyhShowEmptyCategory.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -131,18 +131,18 @@
099FC8D320D8C12A00136BD9 /* WyhShowEmpty */ = {
isa = PBXGroup;
children = (
099FC8D420D8C12A00136BD9 /* UIView+WyhExtension.h */,
099FC8D520D8C12A00136BD9 /* WyhShowEmpty.h */,
099FC8D620D8C12A00136BD9 /* WyhShowEmptyConst.h */,
099FC8D720D8C12A00136BD9 /* WyhEmptyStyle.m */,
099FC8D820D8C12A00136BD9 /* UIView+WyhShowEmpty.m */,
099FC8D920D8C12A00136BD9 /* UIViewController+WyhShowEmpty.m */,
099FC8DD20D8C12A00136BD9 /* WyhShowEmptyConst.m */,
099FC8D420D8C12A00136BD9 /* UIView+WyhExtension.h */,
099FC8DA20D8C12A00136BD9 /* UIView+WyhExtension.m */,
099FC8DB20D8C12A00136BD9 /* WyhEmpty.bundle */,
099FC8DC20D8C12A00136BD9 /* WyhEmptyStyle.h */,
099FC8DD20D8C12A00136BD9 /* WyhShowEmptyConst.m */,
099FC8D720D8C12A00136BD9 /* WyhEmptyStyle.m */,
099FC8DE20D8C12A00136BD9 /* UIViewController+WyhShowEmpty.h */,
099FC8D920D8C12A00136BD9 /* UIViewController+WyhShowEmpty.m */,
099FC8DF20D8C12A00136BD9 /* UIView+WyhShowEmpty.h */,
099FC8D820D8C12A00136BD9 /* UIView+WyhShowEmpty.m */,
099FC8DB20D8C12A00136BD9 /* WyhEmpty.bundle */,
);
path = WyhShowEmpty;
sourceTree = SOURCE_ROOT;
Expand Down

0 comments on commit 2cd20b3

Please sign in to comment.