I've been struggling with some weird bar button item behavior for some time now. For some reason the bold style disappears when the "OK" button is klicked on a alert. I've had this behavior when doing other stuff like presenting a modal view controller and dismissing it as well. Why is the bar button item changing its font weight from bold to regular?
My code:
class ViewController: UIViewController {
@IBAction func buttonAction(sender: AnyObject) {
let alertController = UIAlertController(title: "Title", message: "Message", preferredStyle: .Alert)
let cancelAction = UIAlertAction(title: "OK", style: .Cancel, handler: nil)
alertController.addAction(cancelAction)
presentViewController(alertController, animated: true, completion: nil)
}
}
My settings:
The System Item Done
button expects to be using the Done style. Combining System Item Done
with the Bordered style makes no sense.
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.