-
Notifications
You must be signed in to change notification settings - Fork 3.2k
iPhone X safeArea self.view.mas_safeAreaLayoutGuide crash #491
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
Comments
Same here! |
same here; why demo is ok? |
When using leading and trailing it crashes (left and right are ok). I guess this is why using edges crashes too as it'll translate to use leading and trailing //crash //ok |
Strangely, just mas_safeAreaLayoutGuide is mapped to bottom. Also, leading and trailing are missing |
Turns out, I was using an older version. Leading and Trailing are there now, so you should use something like: make.top.equalTo(self.contentView.mas_safeAreaLayoutGuideTop).with.insets(margins);
make.leading.equalTo(self.contentView.mas_safeAreaLayoutGuideLeading).with.insets(margins);
make.trailing.equalTo(self.contentView.mas_safeAreaLayoutGuideTrailing).with.insets(margins);
make.bottom.equalTo(self.contentView.mas_safeAreaLayoutGuideBottom).with.insets(margins); The regular mas_safeAreaLayoutGuide doesn't seem to work if you want to use the shorthand edges.equalTo |
Uh oh!
There was an error while loading. Please reload this page.
New Issue Checklist
🚫 If this template is not filled out your issue will be closed with no comment. 🚫
Issue Info
Issue Description
please tell me why this code crash when use
make.edges.equalTo(self.view.mas_safeAreaLayoutGuide);
crash log
The text was updated successfully, but these errors were encountered: