【发布时间】:2016-06-01 21:42:06
【问题描述】:
我需要根据标志值禁用alerview索引。
我的观点是:
UIAlertView * alert =[[UIAlertView alloc ] initWithTitle:@"Reminder" message:@"Send a reminder through" delegate:self cancelButtonTitle:nil otherButtonTitles: nil];
[alert addButtonWithTitle:@"Email"];
[alert addButtonWithTitle:@"SMS"];
[alert addButtonWithTitle:@"TS"];
[alert addButtonWithTitle:@"Cancel"];
[alert show];
我有一个名为 isCheck=0 或 1 的标志
如果 isCheck=1 我必须禁用名为 SMS 的按钮索引。谁能帮忙
【问题讨论】:
-
设置 button.tag 并从标签获取视图并禁用它。
-
如何为每个按钮索引创建标签。我已经为 alertview 创建了标签?
-
您的 isCheck 值何时更改? @Arun
-
它来自 webservice @ ronak
-
所以,你可以做的是 [alert addButtonWithTitle:@"SMS"] 仅当 isCheck=1 @Arun
标签: ios objective-c ios7 uialertview