Monday, January 13, 2014

objective-c how to customize function

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:
cited a floor hawkswujh 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;


oc can be added to the C programming habits. . . But oc under the first floor of a custom function as said, and,
Reply:
cited a floor hawkswujh 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;


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:
reference to the third floor fans1991 reply:
Quote: references to a floor hawkswujh 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;


oc can be added to the C programming habits. . . But oc-defined functions under the first floor said as a,,,
ah, thank you

No comments:

Post a Comment