Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v 1.1.0 safeAreaLayoutGuide Crsah #477

Open
nogeo opened this issue Oct 13, 2017 · 20 comments
Open

v 1.1.0 safeAreaLayoutGuide Crsah #477

nogeo opened this issue Oct 13, 2017 · 20 comments

Comments

@nogeo
Copy link

nogeo commented Oct 13, 2017

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?

@cntrump
Copy link
Contributor

cntrump commented Oct 16, 2017

so sorry, safeAreaLayoutGuide is my PR.
by default, self.view.mas_safeAreaLayoutGuide is self.view.mas_safeAreaLayoutGuideBottom

@CDYeah
Copy link

CDYeah commented Oct 17, 2017

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));

@cntrump
Copy link
Contributor

cntrump commented Oct 17, 2017

@CDYeah you are right, it is my mistake

@iwill
Copy link
Contributor

iwill commented Oct 17, 2017

#473 fixed this issue.

@ayang229
Copy link

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];
    }

@iwill
Copy link
Contributor

iwill commented Nov 12, 2017

@robertjpayne We need release a new version for iOS 11 and iPhone X.

@sclcoder
Copy link

is this just a mistake?

@wuweili
Copy link

wuweili commented Nov 27, 2017

@iwill when did a new version for iOS 11 and iPhone X will release? Now 1.1.0 will crash

@iwill
Copy link
Contributor

iwill commented Nov 27, 2017

@wuweili Sorry, I'm also waiting for it ...

@iwill
Copy link
Contributor

iwill commented Nov 27, 2017

I'm using a gist temporarily which works fine.

@LINAICAI
Copy link

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

@yimao009
Copy link

why demo is ok?

@pingwinator
Copy link

@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

@pingwinator
Copy link

@cloudkite Could you bump version? or I could do it and prepare a pull request.

@pingwinator
Copy link

#528
@yimao009, as temporally solution, try to add in your pod file

pod 'Masonry', :git => 'https://github.com/pingwinator/Masonry.git'

@iwill
Copy link
Contributor

iwill commented Jul 20, 2018

I fixed the crash for almost a year. Could you please release a new version with #473 ??? @robertjpayne @cloudkite @nickynick

@pingwinator
Copy link

@iwill I did pull request with bumped version (+fixed travis). But also required a new version in cocoapods repo. #528

@jwilliams-handy
Copy link

@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

@pingwinator
Copy link

@jwilliams-handy as temporally solution, you could use my fork.
just add pod 'Masonry', :git => 'https://github.com/pingwinator/Masonry.git' into your podfile

@jwilliams-handy
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests