Skip to content

v 1.1.0 safeAreaLayoutGuide Crsah #477

Open
@nogeo

Description

@nogeo

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?

Activity

cntrump

cntrump commented on Oct 16, 2017

@cntrump
Contributor

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

CDYeah

CDYeah commented on Oct 17, 2017

@CDYeah

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

cntrump commented on Oct 17, 2017

@cntrump
Contributor

@CDYeah you are right, it is my mistake

iwill

iwill commented on Oct 17, 2017

@iwill
Contributor

#473 fixed this issue.

ayang229

ayang229 commented on Nov 12, 2017

@ayang229

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

iwill commented on Nov 12, 2017

@iwill
Contributor

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

sclcoder

sclcoder commented on Nov 20, 2017

@sclcoder

is this just a mistake?

wuweili

wuweili commented on Nov 27, 2017

@wuweili

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

iwill

iwill commented on Nov 27, 2017

@iwill
Contributor

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

iwill

iwill commented on Nov 27, 2017

@iwill
Contributor

I'm using a gist temporarily which works fine.

LINAICAI

LINAICAI commented on Mar 22, 2018

@LINAICAI

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

yimao009 commented on Jun 25, 2018

@yimao009

why demo is ok?

pingwinator

pingwinator commented on Jul 19, 2018

@pingwinator

@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

pingwinator commented on Jul 19, 2018

@pingwinator

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

7 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @iwill@pingwinator@LINAICAI@nogeo@wuweili

        Issue actions

          v 1.1.0 safeAreaLayoutGuide Crsah · Issue #477 · SnapKit/Masonry