diff --git a/CHANGELOG.md b/CHANGELOG.md index 52d8095..fba2608 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ ## Next ## 3.2.0 -- Added support to display a checkmark with `isChecked` +- Added support to display a checkmark with `isChecked`. ## 3.1.0 diff --git a/ImageAlertAction/Classes/UIAlertAction+Image.swift b/ImageAlertAction/Classes/UIAlertAction+Image.swift index 021ae1e..5bde90b 100644 --- a/ImageAlertAction/Classes/UIAlertAction+Image.swift +++ b/ImageAlertAction/Classes/UIAlertAction+Image.swift @@ -25,7 +25,8 @@ extension UIAlertAction { /// may be used with [UIAlertAction.Style.cancel](https://developer.apple.com/documentation/uikit/uialertaction/style/cancel). /// - parameter image: An image to display on the left side of the button. /// Use this to visually convey the action's purpose. - /// - parameter isChecked: A boolean that will be used to determine if a check mark should be displayed on the right side of the title + /// - parameter isChecked: A boolean that will be used to determine if a + /// check mark should be displayed on the right side of the title. /// - parameter style: Additional styling information to apply to the button. /// Use the style information to convey the type of action that is performed by the button. /// For a list of possible values, see the constants in @@ -50,5 +51,6 @@ extension UIAlertAction { /// The image of the action's button. public var image: UIImage? { value(forKey: imageKey) as? UIImage } + /// A Bool indicating if the action is checked or not. public var isChecked: Bool { value(forKey: isCheckedKey) as? Bool ?? false } } diff --git a/README.md b/README.md index d537d48..6b1d1bf 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ settings.image // returns an optional UIImage #### Adding a checkmark -You can also show a check mark on actions via `isChecked` +You can also show a check mark on actions via `isChecked`. ```swift let settings = UIAlertAction(