uialertcontroller

UIAlertAction completion block not called - iOS

只愿长相守 提交于 2021-02-07 11:36:31
问题 I have an iOS app with a UIAlertController in the form of a action sheet being presented in my app when the user taps on a button. It all works great, apart from one thing, the completion blocks don't get called for some reason. Here is my code: // Setup the alert information/type. UIAlertController *action_view = [UIAlertController alertControllerWithTitle:@"Test title" message:@"test message" preferredStyle:UIAlertControllerStyleActionSheet]; // Create and add the cancel button.

How do I display an alert over a PageViewController after a popover dismissal?

和自甴很熟 提交于 2021-01-29 18:16:23
问题 I have a a VC structure like this UIPageViewController -> detailViewController -> popoverviewcontroller The popoverviewcontroller is dismissed using an unwind segue, bringing us back to the detailviewcontroller Now, after the popover is done being dismissed, I would like to refresh the pages on the pagecontroller, since the action the user takes has changed the data. I would also like to display an alert notifying the user about whether they were successful. So I tried putting this code in

SwiftUI: UIAlertController's textField does not responding in UIAlertAction

人盡茶涼 提交于 2020-07-03 11:41:11
问题 I need to use UIAlertContoller , as SwiftUI's Alert does not support TextField . I must not use Custom created AlertView, due to various reason(Accessibility, DynamicType, Dark Mode support etc). Basic Idea is, SwiftUI's alert must hold TextField & entered text must be reflect back for usage. I created a SwiftUI view by Conforming to UIViewControllerRepresentable following is working code. struct AlertControl: UIViewControllerRepresentable { typealias UIViewControllerType = UIAlertController

SwiftUI: UIAlertController's textField does not responding in UIAlertAction

北城余情 提交于 2020-07-03 11:40:03
问题 I need to use UIAlertContoller , as SwiftUI's Alert does not support TextField . I must not use Custom created AlertView, due to various reason(Accessibility, DynamicType, Dark Mode support etc). Basic Idea is, SwiftUI's alert must hold TextField & entered text must be reflect back for usage. I created a SwiftUI view by Conforming to UIViewControllerRepresentable following is working code. struct AlertControl: UIViewControllerRepresentable { typealias UIViewControllerType = UIAlertController