Slide 31
Slide 31 text
/// Create and return an action with the specified title and behavior.
/// ...
public convenience init(
title: String? = nil,
image: UIImage,
isChecked: Bool = false,
style: UIAlertAction.Style,
handler: ((UIAlertAction) -> Void)? = nil
) {
self.init(title: title, style: style, handler: handler)
// Set values for specific keys, as there is no explicit API available.
setValue(image, forKey: imageKey)
setValue(isChecked, forKey: isCheckedKey)
}
@basthomas 27