macOS/iOS API解説

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

目次

status

レシーバーの状態を返します

解説

レシーバーの状態を返します。
【NSURLHandleStatus】
● NSURLHandleNotLoaded
● NSURLHandleLoadSucceeded
● NSURLHandleLoadInProgress
● NSURLHandleLoadFailed

返り値

( NSURLHandleStatus )

レシーバーの状態

引数

クラス

NSURLHandle

Instance Methods

使用可能

10.0

参照

例文

#import "MyObject.h"

@implementation MyObject

- (IBAction)myAction:(id)sender
{
NSURLHandle *handle;
NSURL *url = [NSURL URLWithString:@"http://www.oomori.com/"];
handle = [NSURLHandle cachedHandleForURL:url];

[handle loadInBackground];

switch ([handle status]){
case NSURLHandleNotLoaded:
    NSLog(@"NSURLHandleNotLoaded");
    break;
case NSURLHandleLoadSucceeded:
    NSLog(@"NSURLHandleLoadSucceeded");
    break;
case NSURLHandleLoadInProgress:
    NSLog(@"NSURLHandleLoadInProgress");
    break;
case NSURLHandleLoadFailed:
    NSLog(@"NSURLHandleLoadFailed");
    break;
default:
    NSLog(@"default");
}
}

@end