UIAlertController* alert = [UIAlertController alertControllerWithTitle:@""
message:@""
preferredStyle:UIAlertControllerStyleActionSheet];
UIAlertAction* share = [UIAlertAction
actionWithTitle:@"Share via iCloud"
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action)
{
[alert dismissViewControllerAnimated:YES completion:nil];
}];
UIAlertAction* create = [UIAlertAction
actionWithTitle:@"Create Document"
style:UIAlertActionStyleDestructive
handler:^(UIAlertAction * action)
{
[alert dismissViewControllerAnimated:YES completion:nil];
}];
[share setValue:[[UIImage imageNamed:@"Help_Bar_Icn"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] forKey:@"image"];
[create setValue:[[UIImage imageNamed:@"Help_Bar_Icn"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] forKey:@"image"];
[alert addAction: share];
[alert addAction: create];
[self presentViewController:alert animated:YES completion:nil];
我已经将UIAlertViewController与设定值图像一起使用,但是这样图像显示在左侧。有人可以帮我,是否有像iOS页面应用程序中所示的默认控件。谢谢你
答案 0 :(得分:-1)
您无法像图片一样自定义默认操作表。为此,您必须将tableview自定义为操作表。
为此,您必须实施协议