numberOfComponents
レシーバーのコンポーネント数を返します
返り値
( NSInteger )
整数値
引数
フレームワーク
ApplicationKit
クラス
NSColor
Instance Methods
使用可能
10.4
参照
-colorSpace
-getComponents
例文
#import "Controller.h" @implementation Controller - (IBAction)myAction:(id)sender { NSColor *theColor = [NSColor colorWithDeviceRed:1 green:0.3 blue:0.8 alpha:1];//ÉJÉâÅ[çÏê¨ #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4 NSLog(@"numberOfComponents %d",[theColor numberOfComponents]); #endif } @end