I’ve been learning iOS for about several months, I find that I should use pointer to objects of many Objective-C types.
But there are some cases that should not use pointer such as “NSInteger” “CGPoint” “BOOL”…
So the questions is : On which conditions should I use a pointer ? and what’s the purpose of using a pointer
I’ve been learning iOS for about several months, I find that I should use
Share
NSInteger, CGPoint, etc.. are not Objective-C Objects.
They are structs or typedefs.
You must use pointers with Object types.
You can use pointers with the other (C) types