简体   繁体   中英

How to update a modalViewController after another modalViewController has exited

I have a view that is presented when a user clicks on a button (a UIModalPresentationFormSheet). This view has 4 text fields on them, and one button that when clicked pops another (UIModalPresentationFormSheet) view on top. The only thing that this view has is a picker. When an entry is picked, the user then goes back to the previous view. I want to display this entry on the original view after this, but I'm not sure how to update the previous view since the method "ViewWillAppear" and "ViewDidAppear" are not called. Is there a way to send an event to the original modal view when a modal view on top has exited? This way I can update the text of a label from the original once that picker view is discarded.

您可以随时使用委派。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM