#UIImagePicker
Explore tagged Tumblr posts
Text
How to change UIImage dimension to (299 * 299) on Swift
How to change UIImage dimension to (299 * 299) on Swift
func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any]) { picker.dismiss(animated: true) classifier.text = "Analyzing Image..." guard let image = info["UIImagePickerControllerOriginalImage"] as? UIImage else { return } UIGraphicsBeginImageContextWithOptions(CGSize(width: 299, height: 299), true, 2.0) image.draw(in: CGRect(x: 0, y: 0,…
View On WordPress
#CoreML#how to make an ios app#Ios#iOS10#iOS11#iOS12#kathir#ktr#ktrkathir#Swift3#swift4#swift4.1#UIImage#UIImagePicker
0 notes
Text
iOS: (Tips) If you have problem selecting image from UIImagePicker on iOS5
I found this problem when I was running Image Picker on iOS5. Basically it refuses to close the modal view once I select an image or take a picture or even cancel my actions. It turned out to be a very stupid problem leading to a very simple solution.
In your didFinishPickingMediaWithInfo or imagePickerControllerDidCancel, you might have the following line:
[picker.parentViewController dismissModalViewControllerAnimated:YES];
It works well on iOS4.3 but it refuses to do the same in iOS5.
The Very Simple Solution ===============
[self dismissModalViewControllerAnimated:YES];
19 notes
·
View notes