macOS/iOS API解説

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

目次

backgroundColors

GridViewの背景色を返します

解説

GridViewの背景色を返します。

返り値

( NSArray * )

引数

フレームワーク

ApplicationKit

クラス

NSGridView

使用可能

10.5

参照

例文

- (IBAction)myAction:(id)sender
{
	//最大行数をセット
	[gridView setMaxNumberOfRows:(NSUInteger)3];
	

	NSLog([[gridView backgroundColors] description]);
}

/**
    Returns the support folder for the application, used to store the Core Data
    store file.  This code uses a folder named "gridview" for
    the content, either in the NSApplicationSupportDirectory location or (if the
    former cannot be found), the system's temporary directory.
 */

- (NSString *)applicationSupportFolder {

    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES);
    NSString *basePath = ([paths count] > 0) ? [paths objectAtIndex:0] : NSTemporaryDirectory();
    return [basePath stringByAppendingPathComponent:@"gridview"];
}