Assorted, Scattered Objective-C Notes as compared to C#

A outlet is like a pre-known property that can be bound
(ie: drag destination object to origin object and assign to the outlet (property) nextKeyView)
is like
[myObject methodToCall:parameters];
int i = myObject.assignValue;
is like
int i = [myObject assignValue];
is like
[[form window].makeKeyAndOrderFront:target];
object myObject();
is like
id myObject;
string myString;
is like
NSString *mystring;
Defining an instance method:
private string myMethod();
is like
– (NSString *)myMethod;
Defining a class method:
public DateTime myMethod();
is like
+ (NSDate *)myMethod;
private float convertAmountbyRate(float amt, float rate)
is like
– (float)convertAmount:(float)amt byRate:(float)rate;
convert.convertAmountbyRate(1.0, 2.3);
is like
[convert convertAmount:1.0 byRate 2.3];
public interface myInterface : myClass {…}
is like
@interface myInterface : NSObject {…} @end

Leave a Reply