2012-09-26 82 views
1

的表情。當我運行此:兼容的指針類型初始化TaggedUIActionAheet型UIActionSheet

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

回答

1

點在第一行的錯誤:

TaggedUIActionSheet *sheet = [[UIActionSheet alloc] 

應該是:

TaggedUIActionSheet *sheet = [[TaggedUIActionSheet alloc] 
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"]; 
} 
相關問題