I am trying to figure out how to add a checkmark to the right side of a button in a UIActionSheet. Is there a safe way to add this checkmark in UIActionSheet's Button? is there any simpler way to do add checkmark in UIActionsheet's buttons without using Of Private api ?
how to add checkmark on UIActionsheet's buttons where i can create tick label in iphone?
Asked Answered
is there any problem to use the unicode checkmarks as part of the button's text? like ✓ or ✔? –
Bittersweet
@Bittersweet i have already try this method but not work any other way... –
Carlicarlick
From iOS 8.0 you can use UIAlertController
. In UIAlertController
, each button item is know as UIAlertAction which add accordingly. UIAlertAction contains a runtime property called image which you can set as per your need.
UIAlertAction *SwipeView =[UIAlertAction actionWithTitle:@"Swipe View" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
}];
[SwipeView setValue:[UIImage imageNamed:@"tick_mark" ] forKey:@"_image"];
© 2022 - 2024 — McMap. All rights reserved.