UIAlertView带收音机按钮iOS

我怎样才能在iOS上创建一个自定义警报视图,其上有一个类似于android中的单选按钮(我想要的是在iOS中)。

在此处输入图像描述

我搜索了一会儿,找不到任何办法,所以我在这里问。

我建议你使用模态视图或尝试添加子视图来实现这一点,不要使用UIAlertView来做到这一点。 我在UIAlertView自定义中使用了相同的iOS 7 UIDatePicker,但它在iOS 7中停止工作。

操作表示例代码:

UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"Select State" delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:@"State 1",@"State 2",@"State 3",@"State 4",@"State 5",@"State 6", @"State 1",@"State 2",@"State 3",@"State 4",@"State 5",@"State 6",@"State 1",@"State 2",@"State 3",@"State 4",@"State 5",@"State 6", nil]; actionSheet.actionSheetStyle = UIActionSheetStyleDefault; [actionSheet showInView:self.view];