objective-c how to customize functions and nslog almost directly in the class or method can be used inside .
If you can not define , you can talk about or talk about nslog source inside Oh not much point to 50 bar.
------ Solution ------------------------------------ --------
in object-oriented , the function call method , oc in the method of classification methods and instance methods. Namely , the method of the plus and minus signs in front .
/ / class methods
+ (Type) method: (Type) param;
/ / instance methods
- (Type) method: (Type) param;
------ Solution ----------------- ---------------------------
NSLog is a C -style function , estimated that you want to define a C function , this is the same with the C program , and in accordance with the wording on the line C
------ Solution -------------------------------- ------------
oc can be added to the C programming habits. . . But oc custom function under the first floor said as a ,
------ Solution ------------------------ --------------------
head
------ Solution ----------------------------------- ---------
OC use the GCC compiler, therefore , one is OC grammar itself , as the first floor , as is the idea of OOP , or just NSLog as the C language global function , this method is very simple, outside the class , using C syntax to define a function like ......
------ eference --------------- ------------------------
oc can be added to the C programming habits. . . But oc under the first floor of a custom function as said , and, ah , thank you
没有评论:
发表评论