【发布时间】:2013-10-07 05:45:40
【问题描述】:
我有一个图像视图,上面有以编程方式创建的UIButtons。我想通过UIActionSheet 删除这些按钮。这在 iPad 上可行吗?请帮帮我。
【问题讨论】:
标签: ios objective-c uibutton
我有一个图像视图,上面有以编程方式创建的UIButtons。我想通过UIActionSheet 删除这些按钮。这在 iPad 上可行吗?请帮帮我。
【问题讨论】:
标签: ios objective-c uibutton
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
使用这些操作表委托方法,您可以删除以编程方式创建的按钮,例如:
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
{
switch(buttonIndex)
{
case 0:
[button removefromsuperview];
}
}
【讨论】: