LSDialogViewController
LSDialogViewController copied to clipboard
CustomDialog View not auto layout
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?
@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.
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.
@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. 😄