iphone - 找不到适用于 iOS 的 NSButton

标签 iphone ios xcode button nsbutton

我正在使用 xcode4 和 Storyboard来创建申请表。 我想添加检查按钮,发现使用 NSButton 是最好的方法,但我在对象库中找不到 NSButton。 你能告诉我如何找到它吗?

最佳答案

NSButton 是 cocoa 类,可在 MacOS 上使用,不适用于 iOS。 iOS 没有标准复选框,因此您必须使用带有自定义图像的 UIButton 来选择/取消选择状态,而不是那样。

或者(可能更好)您可以使用具有类似目的的标准 UISwitch 控件

关于iphone - 找不到适用于 iOS 的 NSButton,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8256352/

相关文章:

iPhone UISearchBar 需要点击两次才能被选中

c++ - CMake 与 Xcode : configured header file (. h.in)未找到

ios - 我的 Xcode 项目中的一些文件和文件夹没有被推送到远程存储库

iphone - XCode 中的简单 Torch 应用

iphone - 检查 View Controller 是否存在,如果不存在则分配/初始化(iOS)

iPhone 应用程序在下载更新后崩溃

iphone - MPMoviePlayerController 仅在横向模式下播放电影

ios - 在 swift 中声明 unsigned char 数组

ios - NSPredicate 返回所有对象

ios - NSURL 图像加载减慢应用程序打开时间 - iOS