isControllerVisible
コントローラーは表示されているかを返します
解説
コントローラーは表示されているかを返します。
● YES コントローラーは表示されています。
● NO 表示されていません。
初期設定はNOです。
10.5以降はQTKitを使ってください。
返り値
( BOOL )
YES/NO
引数
フレームワーク
ApplicationKit
クラス
NSMovieView
Instance Methods
使用可能
10.0
参照
- showController:adjustingSize:
例文
#import "MyObject.h" //myOutletはMovieView @implementation MyObject - (IBAction)act:(id)sender;//アクション { [myOutlet showController:YES adjustingSize:YES]; if([myOutlet isControllerVisible]){ NSLog(@"YES"); }else{ NSLog(@"NO"); } } - (IBAction)setMov:(id)sender//ムービーをセット { //開けるファイル拡張子の配列 NSArray *imgTypes = [ NSArray arrayWithObjects : @"mov",@"movie",nil ]; //OpenPanelを作る NSOpenPanel *opPanel = [ NSOpenPanel openPanel ]; //OpenPanelの結果のボタン番号 int opRet; //ムービーのURL NSURL *movUrl ; //ムービー NSMovie *theMovie; //OpenPanelでファイル選択 opRet = [ opPanel runModalForDirectory : NSHomeDirectory() //どこのディレクトリを出すか file : @"Movies" //どのどのファイルを選択しておくか types : imgTypes ];//選べるファイルタイプ if ( opRet == NSOKButton ) { // OPENPanelのボタンがOKなら //NSImageを作ってファイルから読み込む movUrl = [NSURL fileURLWithPath:[ opPanel filename ]]; theMovie = [[NSMovie alloc] initWithURL:movUrl byReference:YES]; [myOutlet setMovie:theMovie]; } } @end