user1700911
user1700911

Reputation: 11

Incompatible pointer type initializing TaggedUIActionAheet with an expression of type UIActionSheet

When I run this:

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

I get the following error :

Incompatible pointer type initializing TaggedUIActionAheet with an expression of type UIActionSheet

Upvotes: 1

Views: 70

Answers (2)

tushar mistri
tushar mistri

Reputation: 1

Try following:

 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"];
}

Upvotes: 0

InsertWittyName
InsertWittyName

Reputation: 3940

Spot the error in your first line:

TaggedUIActionSheet *sheet = [[UIActionSheet alloc]

Should be:

TaggedUIActionSheet *sheet = [[TaggedUIActionSheet alloc] 

Upvotes: 1

Related Questions