我很难理解 Objective-J 中的方法签名(但在 Objective-C 上应该是一样的)。
语法应该是:
-(return_type)instanceMethod1:(param1_type)param1_varName :(param2_type)param2_varName;
类型在括号之间指定。但是,我发现以下代码行:
1)
var navigationArea = [[CPView alloc] initWithFrame:CGRectMake(0.0, 0.0, 150.0, CGRectGetHeight([contentView bounds]) - 150.0)];
为什么要在括号之间传递参数?我以为您在冒号“:”之后指定参数。
2)
-(void) importDocumentWithName:(NSString *)name withSpecifiedPreferences:(Preferences *)prefs beforePage:(int)insertPage;
什么是“withSpecifiedPreferences”?是描述吗?它有什么用?
谢谢