【发布时间】:2012-01-11 17:25:44
【问题描述】:
我有一个 UIActionsheet。我需要更改其中按钮的颜色。
-(IBAction)showActionSheet:(id)sender {
UIActionSheet *popupQuery = [[UIActionSheet alloc] initWithTitle:@"Title" delegate:self cancelButtonTitle:@"Cancel Button" destructiveButtonTitle:@"Destructive Button" otherButtonTitles:@"Other Button 1", @"Other Button 2", nil];
popupQuery.actionSheetStyle = UIActionSheetStyleBlackOpaque;
[popupQuery showInView:self.view];
[popupQuery release];
}
UIActionsheet 显示为this。一个红色按钮,后跟 2 个灰色按钮和黑色取消按钮。我需要前 3 个按钮为灰色,最后一个按钮为黑色。我怎样才能以编程方式做到这一点?
【问题讨论】:
-
那么,没有其他方法可以在不添加库的情况下执行此操作吗?如果我包含这个库,苹果会接受我的应用程序吗?
标签: iphone