Tuesday, December 3, 2013
For NSArray do not understand
NSArray * array = [NSArray arrayWithObjects: @ "Rain Song", @ "MOMO", @ "wow Kaka", nil];
The above statement should be a problem with the wood bar
But no way to understand why NSArray * array will be used instead of NSArray array;
From the above statement it is, then it should be an array pointer? Dizzy me.
Who can help me, thank you.
Reply:
Indeed pointer
Reply:
All variables are Objective-C object pointer type, so be sure to have the right type of object with an asterisk. . .
Reply:
~ ~ Lz pointer from C # / java transition over the bar?
Reply:
objc which must declare a reference type with *, you do not understand why, on such regulations. Although it is a pointer, however, and c + + pointers are very far inside. Because I did a year objec developers have not used this stuff pointers.
Reply:
Undercover obediently, I c c + + to understand the wonder do not understand.
Reply:
Reference types are pointers
Reply:
Objective-C objects are allocated on the heap
Reply:
Columbia also from the C / C + + direction in turn, used to like
obj-c which in addition to the basic data types, is a pointer type, there *
Reply:
Objective-C object variables are pointer types, NSArray object, so use NSArray * array
Reply:
NSArray is an object, * array object pointer
Reply:
Indeed pointer. In addition to NS, UI types are pointers, such NSAssay, UIBotton. CG class to go you can use c to understand, for example CGFloat f; CGRect rect.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment