【发布时间】:2015-08-11 10:26:47
【问题描述】:
我正在使用 UIAlertController。
现在我可以从以下代码中列出一个项目:
{
UIAlertController *controller = [UIAlertController alertControllerWithTitle: @"Beds"
message: @""
preferredStyle: UIAlertControllerStyleAlert];
[controller.view setBackgroundColor:[UIColor clearColor]];
[controller.view setTintColor:[UIColor blackColor]];
for (int a=0;a<[bedsCount count];a++)
{
UIAlertAction *button = [UIAlertAction actionWithTitle: [bedsCount objectAtIndex:a]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction *action)
{
[bedSelectionText setTitle:[bedsCount objectAtIndex:a] forState:UIControlStateNormal];
}];
[controller addAction: button];
}
我想在 UIAlertController 中显示按钮点击列表,格式如下链接所示:
【问题讨论】:
-
如果您先发布图片甚至是链接,我们可以为您提供帮助,您可以使用imgur.com 上传图片。因为这里的第一个问题是你想要的实际 UI,而不是代码,因为你的代码很好......而且 iOS 中没有复选框,但还有很多其他方法可以创建你想要的内容
-
@pepeng 这里是图片的链接imgur.com/bMu2GUc
-
你能实现它吗?我无法找到如何在 UIAlertController 中添加一个复选框
标签: ios objective-c iphone ios7 uialertcontroller