
Bellow是podcasts应用程序的屏幕截图. 解决方法 最后我通过使用UIAlertController得到了答案:
UIAlertController *customActionSheet = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleActionSheet];UIAlertAction *firstbutton = [UIAlertAction actionWithTitle:@"First button" style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) { //click action}];[firstbutton setValue:[UIcolor blackcolor] forKey:@"TitleTextcolor"];[firstbutton setValue:[UIcolor blackcolor] forKey:@"imageTintcolor"];[firstbutton setValue:@true forKey:@"checked"];UIAlertAction *secondbutton = [UIAlertAction actionWithTitle:@"Second button" style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) { //click action}];[secondbutton setValue:[UIcolor blackcolor] forKey:@"TitleTextcolor"];UIAlertAction *cancelbutton = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action){ //cancel}];[cancelbutton setValue:[UIcolor blackcolor] forKey:@"TitleTextcolor"];[customActionSheet addAction:firstbutton];[customActionSheet addAction:secondbutton];[customActionSheet addAction:cancelbutton];[self presentVIEwController:customActionSheet animated:YES completion:nil]; 这就是结果:
总结以上是内存溢出为你收集整理的ios – 如何添加UIActionSheet按钮复选标记?全部内容,希望文章能够帮你解决ios – 如何添加UIActionSheet按钮复选标记?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)