Skip to content

Conversation

@toohotz
Copy link

@toohotz toohotz commented Nov 11, 2017

No description provided.

@himaratsu
Copy link
Owner

@toohotz Thank your for Gread PR!
I will merge it if PureLayout#203 discussion is closed.

@toohotz
Copy link
Author

toohotz commented Dec 13, 2017

No problem 👍🏾, you might want the changes for yourself as well as it fixes the things with the trailing and bottom to superview along with the inequalities and other methods as well. The maintainer of the repo seems like he is going to reach out for some others to help keep things alive but I'll drop a note there referring to this PR as well.

@toohotz
Copy link
Author

toohotz commented Feb 23, 2018

Hey there, are you going to integrate these changes into your fork?

@himaratsu
Copy link
Owner

@toohotz
Hey, I'm back. I will merge your PR in day or two. Thanks!

constraint = [[self rightAnchor] constraintEqualToAnchor:rightAnchor constant:inset];
break;
case NSLayoutRelationLessThanOrEqual:
constraint = [[self leftAnchor] constraintGreaterThanOrEqualToAnchor:rightAnchor constant:inset];
Copy link
Owner

@himaratsu himaratsu Feb 26, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@toohotz Is this mistake of rightAnchor ?

I think it expect:

constraint = [[self rightAnchor] constraintGreaterThanOrEqualToAnchor:rightAnchor constant:inset];

If not, Please tell me your intension.

Copy link
Author

@toohotz toohotz Feb 26, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, copy pasted had caused the issue, will fix it thank you for catching.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Other code feel good, so I will merge as soon as it's fixed.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem, done.

@himaratsu himaratsu merged commit 9388ce1 into himaratsu:safearea Feb 26, 2018
@himaratsu
Copy link
Owner

Thanks!

@jjksam
Copy link

jjksam commented Feb 26, 2018

Hey guys, I found your approach using NSLayoutAnchor is great, some how I found that there is some compatibility problem if targeting iOS 8.0, the NSLayoutAnchor is only available in iOS 9.0, so if I run the app in iOS 8 (pretty old system), it will cause crash. Although PureLayout do claim that fully compatible with iOS 9.0 but at least it won't crash even if it target the iOS 8.0.
Should we use the primitive API instead of higher level API until the project should no longer support such low version system ? Or whenever higher API available, we can make use of the higher level API.

@toohotz
Copy link
Author

toohotz commented Feb 26, 2018

@jjksam Agreed, NSLayoutAnchor was introduced in iOS 9 so we should restrict this API to target iOS 9 and forward. Since the iPhone X is the first device that utilizes safe area insets and it started life on iOS 11, it should pose no issues. This will be done on the PR on the PureLayout project.

himaratsu pushed a commit that referenced this pull request May 19, 2018
Rebasing to PureLayout:master
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

Successfully merging this pull request may close these issues.

3 participants