我试图弄清楚如何在 UIActionSheet 中的按钮右侧添加复选标记。
有没有安全的方法在 UIActionSheet 的按钮中添加此复选标记?
有没有更简单的方法可以在 UIActionsheet 的按钮中添加复选标记而不使用 Of Private api ?
从 iOS 8.0 开始您可以使用UIAlertController
. In UIAlertController
,每个按钮项都称为 UIAlertAction,它会相应地添加。 UIAlertAction 包含一个名为 image 的运行时属性,您可以根据需要进行设置。
UIAlertAction *SwipeView =[UIAlertAction actionWithTitle:@"Swipe View" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
}];
[SwipeView setValue:[UIImage imageNamed:@"tick_mark" ] forKey:@"_image"];
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)