macOS/iOS API解説

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

目次

type

レシーバーのタイプを返します

解説

レシーバーのタイプを返します
【NSCellType】
● NSTextCellType テキストセル
● NSImageTypeCell 画像セル
● NSNullCellType 内容の無いセル

返り値

( NSCellType )

セルタイプ

引数

フレームワーク

ApplicationKit

クラス

NSCell

Instance Methods

使用可能

10.0

参照

- setType:

例文

//なにか警告が出る
#import "MyObject.h"

@implementation MyObject

- (IBAction)myAction:(id)sender
{

    //bCell1はテキストフィールドセル
    if ([bCell1 type] == NSTextCellType){
        NSLog(@"NSTextCellType");
    }else{
        NSLog(@"other type");
    }
}

@end