Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Syntax for invoking a method in Objective C?

I come from the Java world, so to me it's all object.foo(), but in Objective C, is object messaging the only way to invoke a method?

[object foo];
like image 401
raffian Avatar asked Jun 17 '12 04:06

raffian


1 Answers

You can use KVC:

 [label setValue:@"Some text" forKey:@"text"];
like image 79
Igor Avatar answered Oct 20 '22 02:10

Igor