canInitWithURL:
指定したURLで初期化できるかを返します
+(BOOL)canInitWithURL:(NSURL *)anURL:
解説
指定したURLで初期化できるかを返します。
返り値
( BOOL )
YES/NO
引数
( NSURL * )anURL
URL
フレームワーク
Foundation
クラス
NSURLHandle
Class Methods
使用可能
10.0
参照
例文
#import "MyObject.h" @implementation MyObject - (IBAction)myAction:(id)sender { NSURL *url = [NSURL URLWithString:@"http://www.oomori.com/"]; if ([NSURLHandle canInitWithURL:url]){ NSLog(@"YES"); }else{ NSLog(@"NO"); } } @end