이미지를 기준으로 저장하려한다.
if let data = UIImageJPEGRepresentation(tempImage, 0.95){
let tempDirectoryURL = NSURL.fileURLWithPath(NSTemporaryDirectory(), isDirectory: true)
let targetURL = tempDirectoryURL.URLByAppendingPathComponent("test.jpg")
data.writeToFile(targetURL.path!, atomically: true)
}
이 소스면 끝!
댓글
댓글 쓰기