Reputation: 45
I Use "UIAlertController" & "presentViewController" to show the alertview, like below
let deviceName = bleManager.activePeripheral?.name
let alert = UIAlertController(title: "Connecting...", message: deviceName, preferredStyle: UIAlertControllerStyle.Alert)
presentViewController(alert, animated: true, completion: nil)
Now I want to update the current title from "Connecting" to "Searching", but the alertview can't dismiss.
How to do that?
Upvotes: 0
Views: 330
Reputation: 19892
You can store the alert object in a property, and access it and update it whenever you need.
This includes changing the title or adding actions.
Upvotes: 2