如何在Xcode 7 OSX中创建NSRadioButton组 [英] How to create NSRadioButton Group in Xcode 7 OSX

查看:204
本文介绍了如何在Xcode 7 OSX中创建NSRadioButton组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在关注:


单选按钮的模板现在,Interface Builder对象库中的对象已实现为单独的NSButton对象,而不是OS X v10.8及更高版本不建议使用的较早的NSMatrix。当单选按钮具有相同的superview和-action方法时,它们将自动作为一个组(选择一个按钮将取消选择所有其他相关的按钮)。 (16965941)


因此,拖动单个单选按钮并确保将它们全部连接到同一插座!


I was following this tutorial on how to create radio button group. But it seems Radio Group is no longer available in the Xcode 7 library and I didn't find much information about it. How do I create something like this:

Thanks very much.

解决方案

Quoting from the Xcode 7 release notes:

The template for Radio buttons in the Interface Builder object library is now implemented as individual NSButton objects, rather than the older NSMatrix, which is discouraged on OS X v10.8 and later. Radio buttons automatically act as a group (selecting one button will unselect all other related buttons) when they have the same superview and -action method. (16965941)

So drag individual radio buttons and make sure you connect them all to the same outlet!

这篇关于如何在Xcode 7 OSX中创建NSRadioButton组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆