macOS/iOS API解説

iOS , Mac アプリケーション開発のために使われる主要フレームワークの日本語情報です。2010年代に書かれた内容です。今後更新はありません。

目次

bezelStyle

INDEX>AppKit>NSButton

ボタンの形状を返します

Objective-C

@property NSBezelStyle bezelStyle

Swift

var bezelStyle: NSBezelStyle

解説

ボタンの形状を返します。
【ボタンの形状】

NSBezelStyle - Cocoa API解説(iOS/OS X)

Bevel
f:id:jjj777:20150227204114g:plain

Push
f:id:jjj777:20150227212848g:plain

Check
f:id:jjj777:20150227213346g:plain

Radio
f:id:jjj777:20150227214038g:plain

Round
f:id:jjj777:20150227214647g:plain

Square
f:id:jjj777:20150227214928g:plain

Disclosure Triangle
f:id:jjj777:20150227215247g:plain

Textured
f:id:jjj777:20150227221852g:plain

Help
f:id:jjj777:20150227220347g:plain

Gradient
f:id:jjj777:20150227222142g:plain

Round Texture
f:id:jjj777:20150227222553g:plain

Disclusure
f:id:jjj777:20150228110942g:plain

RoundRect
f:id:jjj777:20150228110059g:plain

Receseed
f:id:jjj777:20150228112227g:plain

Inline
f:id:jjj777:20150228112339g:plain

ボタンの形状

フレームワーク

ApplicationKit

クラス

NSButton

使用可能

10.0

参照


setBezelStyle: - Cocoa API解説(iOS/OS X)

関連記事(外部サイト)


NSButton Class Reference

例文

Objective-C

#import "MyObject.h"

@implementation MyObject

- (IBAction)myAction:(id)sender
{
	
	//senderはボタン
	[sender setBezelStyle : NSRegularSquareBezelStyle ];
	
	if ([sender bezelStyle] == NSRegularSquareBezelStyle){
		NSLog(@"NSRegularSquareBezelStyle");
	}else{
		NSLog(@"other style");
	}
}

@end

Swift