如何解决警告没有实现'UIActionSheetDelegate'协议

时间:2010-06-17 04:18:25

标签: iphone warnings

这是我的.h代码

@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

2 个答案:

答案 0 :(得分:1)

您是否尝试过声明控制器是否遵守UIActionSheetDelegate协议?

@interface ROSettingViewController : UITableViewController<UIActionSheetDelegate>

答案 1 :(得分:0)

你有机会在ROSettingViewController.m上说:321,

myActionSheet.delegate = self;

未指定您的VC实现UIActionSheetDelegate协议