1

当我运行这个:

TaggedUIActionSheet *sheet = [[UIActionSheet alloc] 
        initWithTitle:nil
        delegate:self 
        cancelButtonTitle:@"Cancel" 
        destructiveButtonTitle:@"Delete" 
        otherButtonTitles:@"Save to photos",@"Email",nil];

我收到以下错误:

Incompatible pointer type initializing TaggedUIActionAheet with an expression of type UIActionSheet

4

2 回答 2

1

在第一行发现错误:

TaggedUIActionSheet *sheet = [[UIActionSheet alloc]

应该:

TaggedUIActionSheet *sheet = [[TaggedUIActionSheet alloc] 
于 2012-09-27T21:09:01.840 回答
0

尝试以下操作:

 UIActionSheet *Actionsheet =[[UIActionSheet alloc]initWithTitle:title delegate:delegate cancelButtonTitle:Canclebutton destructiveButtonTitle:destructivebutton otherButtonTitles:nil, nil];

[Actionsheet showInView:self.view];

-(void)Click_Button:(UIButton*)sender
{
    [self ShowActionsheet:@"Do u Want to Delete This Record!!!" Delegate:self canclebutton:@"Cancle" Destructivebutton:@"Yes"];
}
于 2016-02-04T05:36:23.403 回答