macOS/iOS API解説

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

目次

initWithFrame:pixelFormat:

指定した矩形とピクセルフォーマットで初期化して返します
-(id)initWithFrame:(NSRect)frameRect:
         pixelFormat:(NSOpenGLPixelFormat*)format:

解説

指定した矩形とピクセルフォーマットで初期化して返します。

返り値

( id )

NSOpenGLView

引数

( NSRect )frameRect

矩形

( NSOpenGLPixelFormat* )format

フォーマット

フレームワーク

ApplicationKit

クラス

NSOpenGLView

Instance Methods

使用可能

10.0

参照

+ defaultPixelFormat

例文

#import "MyObject.h"

@implementation MyObject

- (IBAction)myAction:(id)sender
{
NSOpenGLView* glView = [[NSOpenGLView alloc] initWithFrame:NSMakeRect(0,0,100,100)
pixelFormat:[NSOpenGLView defaultPixelFormat]];
}

@end