how to add checkmark on UIActionsheet's buttons where i can create tick label in iphone?

1.8k views Asked by At

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 ?

1

There are 1 answers

0
Jaha Rabari On

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"];