我有这样的 CFUserNotificationDisplayAlert 设置:
CFOptionFlags cfRes;
CFUserNotificationDisplayAlert(5, kCFUserNotificationNoteAlertLevel,
NULL, NULL, NULL,
CFSTR("Okay"),
CFSTR("Stop!"),
&cfRes);
switch (cfRes)
{
case kCFUserNotificationDefaultResponse:
strTest = CFSTR("Default response");
break;
case kCFUserNotificationAlternateResponse:
strTest = CFSTR("Alternate response");
break;
}
使用此代码,我收到此错误:
使用未声明的标识符 kCFUserNotifactationDefualtResponce (以及其他 kCF*)
有任何想法吗?我导入了以下内容:
#import <CoreFoundation/CoreFoundation.h>
#import <CoreData/CoreData.h>
#import <UIKit/UIKit.h>
The CFUserNotification API is not available on iOS. Looks to me like you copied that bit of code from a Mac App.
引自 CodaFi's comment以上问题可以标记为已回答:https://meta.stackexchange.com/questions/54718/how-should-i-handle-questions-which-are-answered-in-the-comments
关于ios - CFUserNotificationDisplayAlert CFOptionFlags 不工作?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16049642/
欢迎光临 OStack程序员社区-中国程序员成长平台 (https://ostack.cn/) | Powered by Discuz! X3.4 |