Have two issues one is showFromToolbar statement format warning issue and another is that in performAction method how i can display UIActionSheet.
ActionSheet from showFromToolbar UIBarButtonItem
when i use this statement
[ActionSheet showFromToolbar:(UIToolbar *)view];
On analyzing it shows warning for expected expression
UIActionSheet *ActionSheet = [[UIActionSheet alloc]
initWithTitle:@"Language Options"
delegate:nil
cancelButtonTitle:@"Cancel"
destructiveButtonTitle:nil
otherButtonTitles:@"Devanagari", @"English", nil];
ActionSheet.actionSheetStyle = UIActionSheetStyleBlackTranslucent;
[ActionSheet showFromToolbar:(UIToolbar *)view];
[ActionSheet release];
Button which displays ActionSheet
UIButton *pagecurlButton = [UIButton buttonWithType:UIButtonTypeCustom];
[pagecurlButton addTarget:self action:@selector(performAction:) forControlEvents:UIControlEventTouchUpInside];
pagecurlButton.frame = CGRectMake(0.1, 0.1, 30, 30);
UIImage *img = [UIImage imageNamed:@"pagecurl.png"];
[pagecurlButton setImage:img forState:UIControlStateNormal];
UIBarButtonItem *pagecurl = [[UIBarButtonItem alloc] initWithCustomView:pagecurlButton];
In performAction method how i can display actionsheet upon hiiting.
-(void)performAction:(id)sender
I do not understand why you do this:
It doesn’t make any sense. If you want to present an
UIActionSheet, you have to do this from a real view. You have five methods to do this:In your case I would recommend using the third one –
showInView:.