How to create NSRadioButton Group in Xcode 7 OSX(如何在 Xcode 7 OSX 中创建 NSRadioButton 组)
问题描述
我正在关注 :
<块引用>Interface Builder 对象库中的单选按钮模板现在实现为单独的 NSButton 对象,而不是旧的 NSMatrix,在 OS X v10.8 及更高版本上不鼓励使用.当单选按钮具有相同的 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 组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何在 Xcode 7 OSX 中创建 NSRadioButton 组
基础教程推荐
- libGDX 从精灵或纹理中获取像素颜色 2022-01-01
- Cocos2d iPhone 非矩形精灵触摸检测 2022-01-01
- navigator.geolocation.getCurrentPosition 在 Android 浏览器上 2022-01-01
- iOS4 创建后台定时器 2022-01-01
- 通过重定向链接在 Google Play 中打开应用 2022-01-01
- iPhone - 获取给定地点/时区的当前日期和时间并将其与同一地点的另一个日期/时间进行比较的正确方法 2022-01-01
- Android:getLastKnownLocation(LocationManager.NETWORK_PROVIDER 2022-01-01
- NSString intValue 不能用于检索电话号码 2022-01-01
- 如何从 logcat 中删除旧数据? 2022-01-01
- AdMob 广告未在模拟器中显示 2022-01-01
