Post not yet marked as solved
87
Views
I want to create subscription, that allows user to work my with app
Post not yet marked as solved
107
Views
I already have an array:
var imgArr = [UIImage]()
I want to add there elements:
imgArr.append(UIImage)
Save it, for example:
imgArr.save() // example
And then get items from it, to add array elements to cells:
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "MyCell", for: indexPath)
	 cell.imageView!.image = imgArr[indexPath.row]
return cell
}
Post marked as solved
218
Views
I have array:
var imgs: [UIImage] = userDefaults.object(forKey: "myKey") as? [UIImage] ?? []
How I can save it?
Post not yet marked as solved
192
Views
extension ViewController: VNDocumentCameraViewControllerDelegate, UIImagePickerControllerDelegate {
func documentCameraViewController(_ controller: VNDocumentCameraViewController, didFinish scan: VNDocumentCameraScan) {
for pageNumber in 0..<scan.pageCount {
let image = scan.imageOfPage(at: pageNumber)
print(image)
//save
hasPhoto = true
UIImageWriteToSavedPhotosAlbum(image, self, #selector(image(_:didFinishSavingWithError:contextInfo:)), nil)
//UIImageWriteToSavedPhotosAlbum(image, nil, nil, nil)
}
controller.dismiss(animated: true, completion: nil)
}
Post marked as solved
143
Views
I already have custom album:
let title = "NewScans"
PHPhotoLibrary.shared().performChanges({
PHAssetCollectionChangeRequest.creationRequestForAssetCollection(withTitle: title)
}, completionHandler: { success, error in
if !success { print("Error creating album: \(String(describing: error)).") }
})
And I would like to save in it UIImage, how I can do this?
Post not yet marked as solved
66
Views
In the field the state is not the region of Сrimea