macOS/iOS API解説

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

目次

dataCellForRow:

行で指定したテーブル列のセルを返します
-(id)dataCellForRow:(int)row:

解説

行で指定したテーブル列のセルを返します。
このオブジェクトにセットすることで、配置などを変更することができます。

返り値

( id )

セル

引数

( int )row

フレームワーク

ApplicationKit

クラス

NSTableColumn

Instance Methods

使用可能

10.0

参照

例文

- (IBAction)myAction:(id)sender;//
{
NSTableColumn *theColumn = [table tableColumnWithIdentifier:@"COL1"];
NSCell *tfCell = [theColumn dataCellForRow:0];
[tfCell setAlignment:NSRightTextAlignment];
//すぐに更新されないので幅を変えてます。
[theColumn setWidth:[theColumn width]+1];
[theColumn setWidth:[theColumn width]-1];
}