1-10-05 sound ApplicationKit NSButton 10.0- INDEX>AppKit>NSButton ボタンを押す時の音を返します Objective-C @property(strong) NSSound *sound Swift var sound: NSSound? 解説 ボタンを押す時の音を返します。 設定値 Objective-C NSSound * Swift NSSound? ボタンを押すときの音 フレームワーク ApplicationKit クラス NSButton 使用可能 10.0 参照 setSound: - Cocoa API解説(iOS/OS X) setSound: - Cocoa API解説(iOS/OS X) 関連記事(外部リンク) 例文 Objective-C #import "MyObject.h" @implementation MyObject - (IBAction)myAction:(id)sender { [myOutlet setTitle:[[sender sound] name]]; } @end Swift 編集時のバージョン 10.10