macOS/iOS API解説

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

目次

setDestination:allowOverwrite:

ダウンロード先をセットします
-(void)setDestination:(NSString *)path:
             allowOverwrite:(BOOL)allowOverwrite:

解説

ダウンロード先をセットします。

返り値

( void )

なし

引数

( NSString * )path
( BOOL )allowOverwrite

クラス

NSURLDownload

Instance Methods

使用可能

10.2.7(10.2+safari)

参照

-download:decideDestinationWithSuggestedFilename:
-download:didCreateDestination:

例文

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