本文介绍了目标 C 中的插入符号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
目标 C 中的插入符号是什么意思?
What does the caret in objective C mean?
即.
void (^handler)(NSInteger);
来自 Mac 开发中心
推荐答案
这取决于上下文.在您展示的示例中,它用于表示一个块.插入符号也是基于 C 的语言中的按位异或运算符——这是大多数程序员会把它识别为,所以很好理解它可以取决于它出现的位置,就像 *
等.
It depends on the context. In the example you show, it's used to denote a Block. The caret symbol is also the bitwise XOR operator in C-based languages — that's what most programmers would identify it as, so it's good to understand that it can be both depending on where it appears, much like *
, etc.
虽然我们建议引用,但只需要包含 Apple 的官方 Blocks 参考.
And while we're suggesting references, one simply has to include Apple's official Blocks reference.
这篇关于目标 C 中的插入符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!