当我运行时:
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
答案 0 :(得分:1)
发现第一行中的错误:
TaggedUIActionSheet *sheet = [[UIActionSheet alloc]
应该是:
TaggedUIActionSheet *sheet = [[TaggedUIActionSheet alloc]
答案 1 :(得分: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"];
}