Masonry
Masonry copied to clipboard
v 1.1.0 safeAreaLayoutGuide Crsah
this ok: make.top.equalTo(self.view.mas_safeAreaLayoutGuideTop); make.left.equalTo(self.view.mas_safeAreaLayoutGuideLeft); make.right.equalTo(self.view.mas_safeAreaLayoutGuideRight);
this crash: make.top.left.right.equalTo(self.view.mas_safeAreaLayoutGuide);
why?
so sorry, safeAreaLayoutGuide is my PR. by default, self.view.mas_safeAreaLayoutGuide is self.view.mas_safeAreaLayoutGuideBottom
Do not understand why this change, with the use of examples do not match, easy to read down Provided examples of use make.edges.equalTo (self.view.mas_safeAreaLayoutGuide) .inset (10.0); make.right.bottom.equalTo (self.view.mas_safeAreaLayoutGuide); make.width.height.equalTo (self.view.mas_safeAreaLayoutGuide) .sizeOffset (CGSizeMake (- 40.0, - 40.0));
@CDYeah you are right, it is my mistake
#473 fixed this issue.
When release new version? I see the Demo define is OK
- (MASViewAttribute *)mas_safeAreaLayoutGuide { return [[MASViewAttribute alloc] initWithView:self item:self.safeAreaLayoutGuide layoutAttribute:NSLayoutAttributeNotAnAttribute]; } but in release 1.1.0 version is
- (MASViewAttribute *)mas_safeAreaLayoutGuide { return [[MASViewAttribute alloc] initWithView:self item:self.safeAreaLayoutGuide layoutAttribute:NSLayoutAttributeBottom]; }
@robertjpayne We need release a new version for iOS 11 and iPhone X.
is this just a mistake?
@iwill when did a new version for iOS 11 and iPhone X will release? Now 1.1.0 will crash
@wuweili Sorry, I'm also waiting for it ...
I'm using a gist temporarily which works fine.
I see the source code:
mas_safeAreaLayoutGuide is isEqual to mas_safeAreaLayoutGuideBottom
so if you use mas_safeAreaLayoutGuide to code:
make.edges.equalTo(self.view.mas_safeAreaLayoutGuide);
it mean :
make.edges.equalTo(self.view.mas_safeAreaLayoutGuideBottom);
so it crash
to resolve , you can use:
make.top.equalTo(self.view.mas_safeAreaLayoutGuideTop); make.bottom.equalTo(self.view.mas_safeAreaLayoutGuideBottom); make.left.equalTo(self.view.mas_safeAreaLayoutGuideLeft); make.right.equalTo(self.view.mas_safeAreaLayoutGuideRight);
instead
why demo is ok?
@yimao009 because demo uses the latest version with this fix. The latest cocoapods version has this problem. Just compare UIView+MASAdditions.m
file in your project and from github. https://github.com/SnapKit/Masonry/blob/master/Masonry/View%2BMASAdditions.m#L132
@cloudkite Could you bump version? or I could do it and prepare a pull request.
#528 @yimao009, as temporally solution, try to add in your pod file
pod 'Masonry', :git => 'https://github.com/pingwinator/Masonry.git'
I fixed the crash for almost a year. Could you please release a new version with #473 ??? @robertjpayne @cloudkite @nickynick
@iwill I did pull request with bumped version (+fixed travis). But also required a new version in cocoapods repo. #528
@robertjpayne @cloudkite @nickynick Is it possible to have a new patched released version of Masonry with this fix? It has been almost 2 years now since this issue was raised
@jwilliams-handy as temporally solution, you could use my fork.
just add pod 'Masonry', :git => 'https://github.com/pingwinator/Masonry.git'
into your podfile
Thanks @pingwinator. I’m currently using the fork temporarily but would love for the development team to push up the new version to master so was trying to just echo sentiments.