私はZipArchive aka SZipArchiveのフォークですが、unzipFileAtPath:toDestination:overwrite:password:progressHandler:completionHandler
(phew)機能に問題があります。 WPZipArchive.h#L35-L40(WP/S)ZipArchive進捗/完了ハンドラタイプのSwift
私はスウィフトでのプログラミングだと私は
例えば進捗状況と完了ハンドラのハンドラを書くに問題があります((String!, unz_file_info, Int, Int)->Void)!
ハンドラの作成方法は?
いくつかの試み:エラーと
WPZipArchive.unzipFileAtPath(help, toDestination: temp, progressHandler: (entry:String!, info:unz_file_info, current:Int, total:Int) {
}){ (path:String!, succeeded:Bool, error:NSError!) in
}
.../ViewController.swift:45:142:型の値を変換できません '() - > ()' に期待される引数の型 '(エントリ:文字列!,情報:unz_file_info、 現在:INT、合計:INT)'(別名 '(エントリ: ImplicitlyUnwrappedOptional、情報:unz_file_info_s、現在: のInt、合計:INT)')
この変更は、動作しているようです:)
WPZipArchive.unzipFileAtPath(help, toDestination: temp, progressHandler: {(entry:String!, info:unz_file_info, current:Int, total:Int) in
}){ (path:String!, succeeded:Bool, error:NSError!) in
}