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 ?
Asked
Active
Viewed 1,820 times
4
-
is there any problem to use the unicode checkmarks as part of the button's text? like ✓ or ✔? – holex Jan 23 '15 at 12:01
-
@holex i have already try this method but not work any other way... – Harshil Vyas Jan 23 '15 at 12:59
1 Answers
0
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"];

Jaha Rabari
- 173
- 8