我是 MonoTouch 的新手。我目前正在尝试将 Objective-C 库绑定到 MonoTouch,到目前为止我已经完成了很多工作,但是,我不知道如何绑定以下代码:
static inline NSString* UmRet_lookup(UmRet c) {
#define URLOOK(a) case a: return @#a;
switch (c) {
URLOOK(UMRET_SUCCESS )
URLOOK(UMRET_NO_READER )
URLOOK(UMRET_SDK_BUSY )
URLOOK(UMRET_ALREADY_CONNECTED)
URLOOK(UMRET_NOT_CONNECTED )
URLOOK(UMRET_LOW_VOLUME )
URLOOK(UMRET_UF_INVALID_STR )
URLOOK(UMRET_UF_NO_FILE )
URLOOK(UMRET_UF_INVALID_FILE )
default: return @"<unknown code>";
}
#undef URLOOK
}
还有下一个代码:
#define UMLOG_ERROR @"[UM Error] "
#define UMLOG_WARNING @"[UM Warning] "
#define UMLOG_INFO @"[UM Info] "