Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/42.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone 预期的'';在'之前;(';令牌错误_Iphone_Objective C_Ios_Compiler Errors - Fatal编程技术网

Iphone 预期的'';在'之前;(';令牌错误

Iphone 预期的'';在'之前;(';令牌错误,iphone,objective-c,ios,compiler-errors,Iphone,Objective C,Ios,Compiler Errors,当我编译代码时,显示了一个错误,显示为Expected';'before'('token. 下面是我指出错误的代码部分 @class UITableViewCellEditable; @protocol UITableViewCellEditableDelegate - (void)editDidFinish:(NSMutableDictionary *)result // (in this line of code) { [userDataSource setValue:[r

当我编译代码时,显示了一个错误,显示为Expected';'before'('token.
下面是我指出错误的代码部分

@class UITableViewCellEditable;

@protocol UITableViewCellEditableDelegate
- (void)editDidFinish:(NSMutableDictionary *)result //    (in this line of code)
{ 
    [userDataSource setValue:[result objectForKey:@"text"]
               forKey:[result objectForKey:@"key"]];
}
@optional
我尝试过一些可能性,但仍然是同样的错误!
如何处理它?

您不能在@protocol块中定义方法。它仅用于声明。

您不能在@protocol块中定义方法。它仅用于声明