-
Notifications
You must be signed in to change notification settings - Fork 732
Added apis for using AutoLayout to superview safearea #203
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
Conversation
|
@himaratsu thanks so much for this PR! I've switched to your branch until PureLayout guys do smth. |
|
@himaratsu Good job on starting the initiative on supporting the safe area insets which are now relevant on the iPhone X but noticed a couple of things with your PR:
Looking forward to this getting merged in soon. 👍🏾 |
|
Decided to implement my own changes (lol) so made a PR to your fork which you can take in and hopefully get these merged in. I added iPhone X support and updated one of the demos accordingly as well. To follow up, @mickeyreiss this question I'll direct over to you, noticed that tests are failing when checking the availability of the APIs that depend upon being iOS 11+ (the
|
|
would be nice if this PR can get merged soon, we are using this branch now |
|
Sadly, this project looks like it's abandoned :( |
|
Would anybody here be interested in becoming a maintainer of this library?
…On Tue, Nov 28, 2017 at 05:11 Iulian Onofrei ***@***.***> wrote:
Sadly, this project looks like it's abandoned :(
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#203 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAC5LeYqt-c8Tzj7ve1O-Prn6CuYgTztks5s7AZ4gaJpZM4Pv-H0>
.
|
|
@mickeyreiss I'd be interested in it as I use this library extensively throughout my iOS projects. Feel free to reach out if there's anything else needed. |
|
I could help too, as I'm actively using it in a project and replacing it is not something I would want to do. |
|
I'd love to help if its needed too. I use this library a lot and I'd love to see it up to date. |
|
Just for reference, I have a PR that will take care of the above issues that I noted that can be merged into @himaratsu branch for this PR. Feel free to let me know your thoughts on the changes. |
|
Any luck ? :( |
|
Updating the Travis CI build environment to Xcode version 9.0 or later should solve the issues with the build failure. Currently, the build environment is:
|
|
Any progress on getting this included? Great library btw keen to see it maintained. |
|
@mickeyreiss Any updates in regards to the status of this PR and the library in general would be great |
# Conflicts: # .travis.yml # README.md
|
Can we get a new branch for this in the PureLayout repo while we wait for the Opinions on this? |
toohotz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a bit of additions for consistency and also for tvOS the overscan region matters, we don't want to leave out our tvOS users 😊.
- autoPinEdgeToSuperviewSafeArea(Edge:)(withInset:) // iOS 11.0+ tvOS 11.0+
- autoPinEdgesToSuperviewSafeArea(Edges:)(withInsets:)(excludingEdge:) // iOS 11.0+ tvOS 11.0+
|
@himaratsu I merged a PR that (unfortunately) will generate some warnings inside of the @aravasio The reason being for the fork living so long is that the author recently received write access to the repo after creating the PR hence why it is on a fork. I think the discussion here is valuable to keep from closing this PR to create a new one. This of course won't occur going forward since the author now has write access to the repo. |
|
@himaratsu any updates for this PR? There are quite a few people that would like to have these additional APIs to more easily support |
|
@himaratsu Do you mind if we take your changes and @toohotz's change and make a new pull request? I'm happy to do the work. |
Add some compatibility fix to avoid runtime crash in iOS 8.0
|
@toohotz Can you have a look? Looks like @himaratsu merged in your changes. I'll poke around on the Travis build issue. |
|
@lwdupont so taking a look at the changes, I see two different possible directions that the new APIs could go forward in. The current way that @jjksam had done so in which the So that brings me to the second point in saying when a user pins using these safe area inset methods, should we restrict the usage for (using Both setups would be valid though the latter option aligns more with what Apple does by restricting API usage based on iOS version or should we assume the intention on behalf of the consumer of the API? |
|
I believe we should do as Apple does, and restrict the usage of the new apis to where they make sense. How do we want to go about it? |
|
If we decide to restrict the usage to where it would make sense then via Apple's way of doing things, we'd force the user to do So the points I would like to make here (at least in my opinion) is that here, for versions that are below iOS 11, there are no devices that are affected by the Weird things may begin to happen as the consumer of the API could be under the assumption that because it worked without having to version check within their code, that the superview that the view is pinning to has a I suppose the point that I'm making here is that I would rather the user be aware of the API that they're using and version dependencies that comes with it how Apple does it on their end as well. If in a future version does Apple decide to change how safe area layouts work, for our backwards compatible code that is within this single function, we would have to might have to make changes on our end as well. By explicitly having the consumer be aware of the version specifics, when they wrap the code above in its If we choose to implement the APIs with us handling the version specific APIs then we would have to make aware to the user if the OS that they're are targeting is below that of the APIs which we are using that we will be handling it ourselves which I'm not exactly a fan of. I would much prefer the APIs that are set in place to function as intended and any newer ones to do the job of what it's function signature describes it to be doing. |
|
I've also been using PureLayout and I'm just now catching up on the current situation here - first of all big thanks to @himaratsu and @toohotz and the others for your help with the recent PRs and changes. I saw PR #203 and the other branches that have been made and would also like to see these get rolled in. Looks like @toohotz, @revolter, and @tomidelucca are all now members of the PureLayout organization so it looks like @mickeyreiss has added you as maintainers (thanks Mickey!). Maybe it's possible to get these changes pulled into the master branch for a release sometime soon? I'm willing to help but I feel like I have the least amount of context on the code changes - however if there's anything I can do to support please let me know! |
|
I'm going to work on releasing this on the weekend. FYI. |
|
@lwdupont Thank you so much for your help with this! It's greatly appreciated!! 😀 |

It's adaptive for safeAreaLayoutGuide of iOS 11. ( #199 )
For setting AutoLayout to superview safearea, we need to use NSLayoutAnchor.
This PR makes us to be able to write it more like PureLayout.
Now:
Using PureLayout in this PR: