Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在Objective-C中将iOS可用性检查添加到IBOutlet_Ios_Objective C_Sign In With Apple - Fatal编程技术网

在Objective-C中将iOS可用性检查添加到IBOutlet

在Objective-C中将iOS可用性检查添加到IBOutlet,ios,objective-c,sign-in-with-apple,Ios,Objective C,Sign In With Apple,我正在将Apple登录添加到我的应用程序中,我知道它仅在iOS 13及更高版本中受支持,而我仍然支持返回iOS 11 我想通过故事板添加按钮,因为这就是我正在使用的。当我添加按钮时: @property (weak, nonatomic) IBOutlet ASAuthorizationAppleIDButton *signInWithAppleButton; 我得到以下警告: 如你所料 修复程序在我的接口声明上方添加了一个API\u AVAILABLE宏,因此现在看起来如下所示: API_

我正在将Apple登录添加到我的应用程序中,我知道它仅在iOS 13及更高版本中受支持,而我仍然支持返回iOS 11

我想通过故事板添加按钮,因为这就是我正在使用的。当我添加按钮时:

@property (weak, nonatomic) IBOutlet ASAuthorizationAppleIDButton *signInWithAppleButton;
我得到以下警告:

如你所料

修复程序在我的接口声明上方添加了一个
API\u AVAILABLE
宏,因此现在看起来如下所示:

API_AVAILABLE(ios(13.0))
@interface SignUpViewController ()

// .. bunch of IBOutlets
@property (weak, nonatomic) IBOutlet ASAuthorizationAppleIDButton *signInWithAppleButton;

@end
我的问题是:这是正确的吗?该应用程序在iOS 12上仍然运行得很好,如果它运行的是低于iOS 13的任何东西,我可以隐藏该按钮,但我只是觉得奇怪,它的修复程序应用于整个界面,而不仅仅是应用于
IBOutlet


非常感谢您提供的任何信息。

关于这件事,您得到什么答复了吗?我在swift上面对这个问题。我也想知道你是如何处理这件事的。