-
Notifications
You must be signed in to change notification settings - Fork 522
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
Adding a textfield to popup and save function? #136
Comments
Hey there, text fields are currently not supported for the default view controller. As you said, you can definitely handle this in your custom view controller, which is more flexible in many regards. You could for example prevent auto-dismiss for individual buttons, at initialization of the button set
This way, you can use the action closure to trigger logic in your custom view controller. You do have a reference to it anyhow, as you pass it to popup dialog at initialization time. Once your custom view controller logic is done and valid, you can dismiss the dialog manually, either from the button action or the custom view controller itself. You can also add a reference to the popup dialog instance to your custom view controller, just make sure it is weak so you don't have any retain cycles. There is a similar demo to be found at #87. Hope that helps :) |
Ok thanks. This is one of my fav libraries for pop up animation. Would be great to eventually see text fields supported |
As custom view controllers can be used to achieve this behavior, there are currently no plans in adding this. Feel free to do a PR if you have a generic way of implementing this. Thx! |
I was using your pop up effect on a project I was working on and couldn't figure out how to input a textfield properly in the pop up. I was wondering if you could help me with a problem. I'd really appreciate it!
I'm using separate view controller to pull up a pop up that the user can comment in. Right now I have the text field IBAction in a separate swift file aside from the table cell view controller im working on.
I basically want to know how to turn this into your version using a separate view controller:
Right now I have this, which creates the pop up view controller but the doesn't allow me to save or edit functions in the text field created in the other view controller.
I'm basically trying to create a text field in the pop up that the user can save data from.
Is there a way to create a text field in a regular pop up or does it have to be in a separate view controller pop up?
Any help would be much appreciated. Thanks in advance
The text was updated successfully, but these errors were encountered: