What does the symbol ^ mean in Objective-C? [duplicate]
Possible Duplicate:
Caret in objective C
I just want to know what this ^ symbol means in Objective-C.
It can mean several things:
type (^name)(arguments)
is a declaration of a block object.
^(arguments) { ... }
is a block object literal
x ^ y
is the bitwise XOR operator
It is used to define blocks in later versions of iOS. See http://developer.apple.com/library/ios/#documentation/cocoa/Conceptual/Blocks/Articles/00_Introduction.html
It means a couple of things:
- It can mean bitwise
XOR
. - It can also signify a pointer to a block (just like
*
is marks a pointer to a function).
精彩评论