RAGOpoR
RAGOpoR

Reputation: 8168

How to resolve warning about does not implement the 'UIActionSheetDelegate' protocol

here is my .h code

@interface ROSettingViewController : UITableViewController
{
    UISwitch                *switchCtl;
    UISwitch                *switchCtl1;
    NSArray                 *dataSourceArray;
}

@property (nonatomic, retain, readonly) UISwitch *switchCtl;
@property (nonatomic, retain, readonly) UISwitch *switchCtl1;
@property (nonatomic, retain) NSArray *dataSourceArray;

- (void)dialogOKCancelAction;
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex;

@end

/Users/ragopor/Desktop/Power Spot beta 2/code/Classes/ROSettingViewController.m:321: warning: class 'ROSettingViewController' does not implement the 'UIActionSheetDelegate' protocol

Upvotes: 0

Views: 615

Answers (2)

chrisbtoo
chrisbtoo

Reputation: 1572

The chances are you're saying, on ROSettingViewController.m:321,

myActionSheet.delegate = self;

without having specified that your VC implements the UIActionSheetDelegate protocol

Upvotes: 0

warrenm
warrenm

Reputation: 31782

Have you tried declaring your controller's adherence to the UIActionSheetDelegate protocol?

@interface ROSettingViewController : UITableViewController<UIActionSheetDelegate>

Upvotes: 1

Related Questions