[英]Use of undeclared identifier 'NSButtonCell'
I am trying to implement some radio button functionality. 我正在尝试实现一些单选按钮功能。 I found this page but when I try to use the classes NSButtonCell, NSRect and NSMatrix I get the error:
我找到了此页面,但是当我尝试使用NSButtonCell,NSRect和NSMatrix类时,出现错误:
Use of undeclared identifier 'NSButtonCell'
使用未声明的标识符“ NSButtonCell”
Use of undeclared identifier 'NSRect'
使用未声明的标识符“ NSRect”
Use of undeclared identifier 'NSMatrix'
使用未声明的标识符“ NSMatrix”
I tried to import AppKit/AppKit.h but I get file not found. 我尝试导入AppKit / AppKit.h,但找不到文件。 After reading this I changed it to UIKit/UIKit.h but the problem remains.
阅读此内容后,我将其更改为UIKit / UIKit.h,但问题仍然存在。
How can I solve this? 我该如何解决?
NSButton is only for mac applications, i think. 我认为NSButton仅适用于Mac应用程序。
Create uibutton with background image. 使用背景图片创建uibutton。 It will be easier and simple.
这将变得更加容易和简单。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.