2013-10-07 48 views

回答

0

不幸的是没有办法设置一个破坏性的按钮作为UIButton,除非你有一个红色的渐变背景图像创建一个自定义按钮,像THIS

您可以创建一个红色的按钮,像上述或类似THIS规定的方法

+0

我面临一个问题,每当我删除一个特定的按钮,每次最后一个按钮被删除。 – debina

0
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex 

使用这些actionsheet委托方法可以删除该例如创建programmaticlly按钮:

- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex 
{ 
    switch(buttonIndex) 
    { 
     case 0: 

     [button removefromsuperview]; 

    } 
} 
相关问题