Orderella / PopupDialog

A simple, customizable popup dialog for iOS written in Swift. Replaces UIAlertController alert style.
http://www.mwfire.de
Other
3.96k stars 522 forks source link

How to resize the height of the PopupDialog? #289

Closed katunch closed 5 years ago

katunch commented 6 years ago

Hi

Is there a way to resize the height of the PopupDialog?

For example: I have an initial height of 300. There is a textfield inside the popup. The popup should now grow with the amount of lines which i write into the textfield.

Is there any easy way for that?

Thx

mwfire commented 6 years ago

Hey there @katunch,

sry for my late reply! The height should adapt whenever the height of the custom view changes. You just have to make sure that constraints from top to bottom are there, so the height can be inferred.

Does that work for you?

kokitang commented 6 years ago

Hey there @katunch,

sry for my late reply! The height should adapt whenever the height of the custom view changes. You just have to make sure that constraints from top to bottom are there, so the height can be inferred.

Does that work for you?

seems not work.. could you make an example showing this behavior?

mwfire commented 6 years ago

bildschirmaufnahme 2018-12-02 um 18 19 29 2018-12-02 18_32_10

I altered the example project a bit, that is, I created an outlet for the top constraint in the rating view controller. When changing the constant (on textfield focus / unfocus), the height is adapted automatically. I did not check with a multiline text, though.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.