iphone - UIActionSheetDelegate Warning for View Controller -


I have set up a UiXShet popup with just two buttons and assigned an action to one of them. The app compiles and runs and works properly but I get a warning:

  Warning: 'MyViewController' class does not implement the 'UIActionSheetDelegate' protocol   
  - (IBAction) saveImage {UIActionSheet * saveMenu = [[UIActionSheet alloc] initWithTitle: @ "Save image to photo library" Automatically CancelTutton: @ "Dismiss" Destructive Button: Other No Button Titles: @ "Save Image", Zero]; [SaveMenu showInView: self.view]; [Left menu release];   

And I signed the "Save Image" button:

  - (zero) Workshop: (UIActionSheet *) Clicked the ActionShut buttonEtindex: (NSInteger ) Button index {if (buttonIndex == 0) {UIImage * imageToSave = [imageView image]; // Optionally, save imageView.image // in the camera roll / saved photo album UIImageWriteToSavedPhotosAlbum (imageToSave, zero, zero, zero); }}   

Should I ignore this build warning? Or how can you improve the warning?

You & lt; UIActionSheetDelegate & gt; Before the curly bracket ( {) on the line beginning with the @ interface in the header file. Example: @interface MyViewController: UIViewController & lt; UIActionSheetDelegate & gt; {

This will squash warning

Comments