diff --git a/Example/Sources/Extensions/AlertService.swift b/Example/Sources/Extensions/AlertService.swift index 4dbb569c..cb3cdda3 100644 --- a/Example/Sources/Extensions/AlertService.swift +++ b/Example/Sources/Extensions/AlertService.swift @@ -18,11 +18,16 @@ class AlertService { for action in actions { alert.addAction(action) } - if let topVC = UIApplication.getTopMostViewController() { - alert.popoverPresentationController?.sourceView = topVC.view - alert.popoverPresentationController?.sourceRect = CGRect(x: topVC.view.bounds.midX, y: topVC.view.bounds.midY, width: 0, height: 0) - alert.popoverPresentationController?.permittedArrowDirections = [] - topVC.present(alert, animated: true, completion: completion) +// if let topVC = UIApplication.getTopMostViewController() { +// alert.popoverPresentationController?.sourceView = topVC.view +// alert.popoverPresentationController?.sourceRect = CGRect(x: topVC.view.bounds.midX, y: topVC.view.bounds.midY, width: 0, height: 0) +// alert.popoverPresentationController?.permittedArrowDirections = [] +// topVC.present(alert, animated: true, completion: completion) +// } + + if let current = (UIApplication.shared.delegate as? AppDelegate)?.window?.rootViewController { + + current.present(alert, animated: true, completion: completion) } } diff --git a/Example/Sources/Resources/Assets.xcassets/camera.imageset/Contents.json b/Example/Sources/Resources/Assets.xcassets/camera.imageset/Contents.json index 978d9b18..c3d1e747 100644 --- a/Example/Sources/Resources/Assets.xcassets/camera.imageset/Contents.json +++ b/Example/Sources/Resources/Assets.xcassets/camera.imageset/Contents.json @@ -1,11 +1,11 @@ { "images" : [ { + "filename" : "camera.png", "idiom" : "universal", "scale" : "1x" }, { - "filename" : "camera.png", "idiom" : "universal", "scale" : "2x" }, diff --git a/Example/Sources/Views/CameraInputBarAccessoryView.swift b/Example/Sources/Views/CameraInputBarAccessoryView.swift index 6854d491..fc588954 100644 --- a/Example/Sources/Views/CameraInputBarAccessoryView.swift +++ b/Example/Sources/Views/CameraInputBarAccessoryView.swift @@ -72,7 +72,13 @@ extension CameraInputBarAccessoryViewDelegate { return InputBarButtonItem() .configure { $0.spacing = .fixed(10) - $0.image = UIImage(named: named)?.withRenderingMode(.alwaysTemplate) + + if #available(iOS 13.0, *) { + $0.image = UIImage(systemName: "camera.fill")?.withRenderingMode(.alwaysTemplate) + } else { + $0.image = UIImage(named: named) + } + $0.setSize(CGSize(width: 30, height: 30), animated: false) }.onSelected { $0.tintColor = .systemBlue