プライベート フレームワークの関数で使用されるオブジェクトの実装に C コールバックを実装したため、コールバックに渡される引数を制御できません。コールバックから使用したいと思いself
ます。ありがとう。
編集:
MyObject.h/.m
#import "PrivateFramework.h"
@interface MyObject : NSObject
-(void) start;
@end
void callback(void* arg1, int arg2);
void callback(void* arg1, int arg2) {
/*
here I would like to use self (current instance of the object) but
I can't pass a pointer to the instance in the callback since I don't
control what is passed to it.
*/
@implementation MyObject
-(void)start {
// this function is inside a private framework.
PrivateFunction(&callback);
}
@end