开发者

What does the symbol ^ mean in Objective-C? [duplicate]

This question already has answer开发者_JAVA技巧s here: Closed 11 years ago.

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:

  1. It can mean bitwise XOR.
  2. It can also signify a pointer to a block (just like * is marks a pointer to a function).
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜