macOS/iOS API解説

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

目次

download:decideDestinationWithSuggestedFilename:

ダウンロードし始めたときに呼び出されます
-(void)download:(NSURLDownload *)download:
                  decideDestinationWithSuggestedFilename:(NSString *)filename:

解説

ダウンロードし始めたときに呼び出されます。

返り値

( void )

なし

引数

( NSURLDownload * )download
( NSString * )filename

クラス

NSURLDownload

Instance Methods

使用可能

10.2.7(10.2+safari)

参照

例文

- (void)download:(NSURLDownload *)theDownload decideDestinationWithSuggestedFilename:(NSString *)filename
{
    //デスクトップに
        NSString *path = [[NSHomeDirectory() stringByAppendingPathComponent:@"Desktop"] stringByAppendingPathComponent:filename];
        [download setDestination:path allowOverwrite:NO];

}