objective-c how to customize functions and nslog almost directly in the class or method can be used inside.
If not defined, you can talk about or talk about nslog inside source Oh not much of it on 50.
Reply:
In object-oriented, functions called methods, oc classification methods and instance methods. Namely, the method before the plus and minus.
/ / Class methods
+ (Type) method: (Type) param;
/ / Instance method
- (Type) method: (Type) param;
Reply:
NSLog is a C-style function, you want to define a C function estimation, this is the same with the C program, in accordance with the wording on the line C
Reply:
oc can be added to the C programming habits. . . But oc under the first floor of a custom function as said, and,
Reply:
Head
Reply:
OC using a GCC compiler, so one is OC's own syntax, like the first floor, as is the idea of OOP, or just NSLog as a global function of the C language, this method is very simple, in a class outside with C syntax definition of a function just fine ......
Reply:
ah, thank you
No comments:
Post a Comment