swift – 如何在Xcode 7 OSX中创建NSRadioButton组

前端之家收集整理的这篇文章主要介绍了swift – 如何在Xcode 7 OSX中创建NSRadioButton组前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在关注如何创建单选按钮组 this tutorial。但是,似乎Radio Group在Xcode 7库中已经不再可用了,我没有找到很多关于它的信息。如何创建这样的东西:

非常感谢。

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)

所以拖动单个单选按钮,并确保您将它们连接到同一个插座!

原文链接:https://www.f2er.com/swift/320649.html

猜你在找的Swift相关文章