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

View inset for bottom and trailing separately #144

Closed
rajtharan-g opened this issue Jun 13, 2018 · 1 comment
Closed

View inset for bottom and trailing separately #144

rajtharan-g opened this issue Jun 13, 2018 · 1 comment
Milestone

Comments

@rajtharan-g
Copy link
Contributor

rajtharan-g commented Jun 13, 2018

Hi @jjochen ,

We are able to specify the inset with which the floating button should be placed like below.

actionButton.display(inViewController: self, viewInset: 30)

30x30
Here in above image, the inset with which button is placed is kept at 15 its from the right and 15 its from the bottom.

What if we need to place at a position of 30 pts from the right and 60 pts from the bottom. I need to have something like below.
30x60

@jjochen
Copy link
Owner

jjochen commented Jun 13, 2018

Hey @rajtharan-g,

you can use layout constraints like with any other view.

display(inViewController:) doesn't do anything but addSubview and define some layout constrains.
See here and here.

If you want to use layout constraints you should remove display(inViewController:) and use addSubview plus whatever constraints you want instead.

In any case, it probably makes sense to improve display(inViewController:) some more. I will do it as soon as I find some time 😉

@jjochen jjochen added this to the 0.9.2 milestone Jun 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants