class MyClass():
def printer(name="abc", description="123")
print name + description
这是python ......你怎么能把它翻译成目标C?
答案 0 :(得分:2)
这样的事情会让你开始:
- (void)printName:(NSString *)name andDescription:(NSString *)description
{
if (name == nil) name = @"abc";
if (description == nil) description = @"123";
NSLog(@"%@%@", name, description);
}