ZipArchive aka SZipArchive의 포크 인 ZIP 라이브러리 WPZipArchive을 사용하려고하는데 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
}