谁能告诉我有关 iOS 中的函数指针的信息?谢谢:D
最佳答案
如果我正确理解你在想什么。
<强>1。就像在 C 中一样
void yourfunc() {}
foo(&yourfunc);
<强>2。在 Objective-C 中 您可以使用@selector 和method sig“引用”一个方法
- (void) test:(NSInteger)n withTest:(BOOL)isTrue {}
[object performSelector:@selector(test:withTest:)];
关于iphone - iOS 中的函数指针?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3581917/