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

CustomDialog View not auto layout #7

Open
uypanha opened this issue Mar 7, 2019 · 2 comments
Open

CustomDialog View not auto layout #7

uypanha opened this issue Mar 7, 2019 · 2 comments

Comments

@uypanha
Copy link

uypanha commented Mar 7, 2019

I was try to make dialog with auto layout, but turns out the size is the same as xib file designed. How to solve this?

@daihase
Copy link
Owner

daihase commented Mar 8, 2019

@uyphanha
When creating a view to be displayed in LSDialogView using xib, prepare another View in the lower hierarchy besides the View prepared from the beginning. It will be a part that covers the contents of Dialog.

saveconfirmview_xib

If you use the whole Xib as a part of Dialog, the size of that Xib will be unchanged. If you do not dare use the whole Xib, you can use AutoLayout to display it in whatever size you like.

I hope this is the answer you want to know.

@uypanha
Copy link
Author

uypanha commented Mar 12, 2019

@daihase, I've just forked your source code and modified the code to AutoLayout for the whole Xib and the size will be less or equal to 0.9 of dialog main view.

If you want me to PR to your code, I'll do so. 😄

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

No branches or pull requests

2 participants