Getting three warning messages for these three statements
ActionSheet.actionSheetStyle = UIActionSheetStyleBlackOpaque;
[ActionSheet showInView:self.view ];
[ActionSheet release];
Local declaration of ‘ActionSheet’ hides instance variable
@property (nonatomic, retain) UIActionSheet *ActionSheet;
@synthesize ActionSheet;
-(void)displayActionSheet:(id)sender
{
UIActionSheet *ActionSheet = [[UIActionSheet alloc]
initWithTitle:@"Language Options"
delegate:nil
cancelButtonTitle:@"Cancel"
destructiveButtonTitle:nil
otherButtonTitles:@"Devanagari", @"English", nil];
ActionSheet.actionSheetStyle = UIActionSheetStyleBlackOpaque;
[ActionSheet showInView:self.view ];
[ActionSheet release];
}
Any idea what is wrong.
First: variables are NOT written in uppercase. please rename your actionSheet variable.
Second: your property hast the same name, as your local variable (ActionSheet in your case). If you want to save the actionSheet in the member variable, than remove
UIActionSheet*resulting in that function: