LSDialogViewController icon indicating copy to clipboard operation
LSDialogViewController copied to clipboard

CustomDialog View not auto layout

Open uypanha opened this issue 6 years ago • 2 comments
trafficstars

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?

uypanha avatar Mar 07 '19 17:03 uypanha

@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.

daihase avatar Mar 08 '19 15:03 daihase

@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. 😄

uypanha avatar Mar 12 '19 16:03 uypanha