|
|
@ -42,15 +42,15 @@ class MultiMediaManager: NSObject { |
|
|
|
} |
|
|
|
// |
|
|
|
let alertController = UIAlertController(title: nil, message: "Gme would like to access your camera", preferredStyle: presentationStyle) |
|
|
|
let cameraAction = UIAlertAction(title: "Camera", style: UIAlertActionStyle.default) { (action) in |
|
|
|
let cameraAction = UIAlertAction(title: "camera_text".localized(), style: UIAlertActionStyle.default) { (action) in |
|
|
|
self.openCamera(mode: .photo) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
let galleryAction = UIAlertAction(title: "Gallery", style: UIAlertActionStyle.default) { (action) in |
|
|
|
let galleryAction = UIAlertAction(title: "gallery_text".localized(), style: UIAlertActionStyle.default) { (action) in |
|
|
|
self.showPhotoGallery(mode: mode) |
|
|
|
} |
|
|
|
let cancelAction = UIAlertAction(title: "Cancel", style: .cancel, handler: nil) |
|
|
|
let cancelAction = UIAlertAction(title: "cancel_text".localized(), style: .cancel, handler: nil) |
|
|
|
alertController.addAction(cameraAction) |
|
|
|
alertController.addAction(galleryAction) |
|
|
|
alertController.addAction(cancelAction) |
|
|
@ -77,7 +77,7 @@ class MultiMediaManager: NSObject { |
|
|
|
if isAllowed { |
|
|
|
openPicker() |
|
|
|
}else { |
|
|
|
self.presenter?.presenting().alert(message: "Camera access denied. Do you want to change the permission from settings?", okAction: { |
|
|
|
self.presenter?.presenting().alert(message: "camera_access_denied_text", okAction: { |
|
|
|
let url = URL(string: UIApplicationOpenSettingsURLString)! |
|
|
|
UIApplication.shared.open(url, options: [:], completionHandler: nil) |
|
|
|
}) |
|
|
@ -94,7 +94,7 @@ class MultiMediaManager: NSObject { |
|
|
|
self.imagePicker.mediaTypes = mediaTypes |
|
|
|
self.presentViewController(viewController: self.imagePicker, animated: true, completion: nil) |
|
|
|
}else { |
|
|
|
self.presenter?.presenting().alert(message: "Gallery access denied. Do you want to change the permission from settings?", okAction: { |
|
|
|
self.presenter?.presenting().alert(message: "galery_access_denied_text".localized(), okAction: { |
|
|
|
let url = URL(string: UIApplicationOpenSettingsURLString)! |
|
|
|
UIApplication.shared.open(url, options: [:], completionHandler: nil) |
|
|
|
}) |
|
|
|