gpt4 book ai didi

ios - CFUserNotificationDisplayAlert CFOptionFlags 不工作?

转载 作者:塔克拉玛干 更新时间:2023-11-02 21:43:36 24 4
gpt4 key购买 nike


我有一个像这样的 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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com