macOS/iOS API解説

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

目次

NSGetFileType

ペーストボードタイプでファイルタイプを返します
NSString *  NSGetFileType ( 
             NSString *   pboardType );

解説

ペーストボードタイプでファイルタイプ(拡張子)を返します。

返り値

引数

( NSString * )pboardType

フレームワーク

ApplicationKit

クラス

NSGetFileType

Function

使用可能

10.0

参照

NSCreateFileContentsPboardType
NSCreateFilenamePboardType

例文

#import "MyObject.h"

@implementation MyObject

- (IBAction)myAction:(id)sender
{

NSLog([NSString stringWithFormat:@"fileType = %@",NSCreateFileContentsPboardType(@"jpg")]);

NSLog(NSGetFileType(@"NXTypedFileContentsPboardType:jpg"));


}

@end