macOS/iOS API解説

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

目次

setBoxType:

ボックスのボックスタイプをセットします
-(void)setBoxType:(NSBoxType)boxType:

解説

ボックスのボックスタイプをセットします。
【NSBoxType】
● NSBoxPrimary 透明グレー
● NSBoxSecondary 
● NSBoxSeparator グレー
● NSBoxOldStyle 線

返り値

( void )

なし

引数

( NSBoxType )boxType

ボックスタイプ

フレームワーク

ApplicationKit

クラス

NSBox

Instance Methods

使用可能

10.0

参照

例文

#import "MyObject.h"

@implementation MyObject
//myOutletÇÕNSBox
- (IBAction)myAction:(id)sender
{
	
	switch ([myOutlet boxType]){
		case NSBoxPrimary:
			NSLog(@"NSBoxPrimary");
			[myOutlet setBoxType:NSBoxSecondary];
			break;
		case NSBoxSecondary:
			NSLog(@"NSBoxSecondary");
			[myOutlet setBoxType:NSBoxSeparator];
			break;
		case NSBoxSeparator:
			NSLog(@"NSBoxSeparator");
			[myOutlet setBoxType:NSBoxOldStyle];
			break;
		case NSBoxOldStyle:
			NSLog(@"NSBoxOldStyle");
			[myOutlet setBoxType:NSBoxPrimary];
			break;
		#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
		case NSBoxCustom:
			NSLog(@"NSBoxCustom");
			[myOutlet setBoxType:NSBoxCustom];
			break;
		#endif
    }
    [myOutlet display];
	
}

@end