Skip to content

Commit 6b6532f

Browse files
mofifications
1 parent a43228e commit 6b6532f

4 files changed

Lines changed: 3 additions & 53 deletions

File tree

Example/Sources/Extensions/AlertService.swift

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -18,40 +18,11 @@ class AlertService {
1818
for action in actions {
1919
alert.addAction(action)
2020
}
21-
// if let topVC = UIApplication.getTopMostViewController() {
22-
// alert.popoverPresentationController?.sourceView = topVC.view
23-
// alert.popoverPresentationController?.sourceRect = CGRect(x: topVC.view.bounds.midX, y: topVC.view.bounds.midY, width: 0, height: 0)
24-
// alert.popoverPresentationController?.permittedArrowDirections = []
25-
// topVC.present(alert, animated: true, completion: completion)
26-
// }
2721

28-
if let current = (UIApplication.shared.delegate as? AppDelegate)?.window?.rootViewController {
29-
30-
current.present(alert, animated: true, completion: completion)
31-
}
22+
UIApplication.shared.delegate?.window??.rootViewController?.present(alert, animated: true, completion: completion)
3223
}
3324

3425

3526
}
3627

3728

38-
39-
extension UIApplication {
40-
class func getTopMostViewController(base: UIViewController? = UIApplication.shared.keyWindow?.rootViewController) -> UIViewController? {
41-
if let nav = base as? UINavigationController {
42-
return getTopMostViewController(base: nav.visibleViewController)
43-
}
44-
if let tab = base as? UITabBarController {
45-
if let selected = tab.selectedViewController {
46-
return getTopMostViewController(base: selected)
47-
}
48-
}
49-
if let presented = base?.presentedViewController {
50-
return getTopMostViewController(base: presented)
51-
}
52-
return base
53-
}
54-
}
55-
56-
57-

Example/Sources/Resources/Assets.xcassets/camera.imageset/Contents.json

Lines changed: 0 additions & 21 deletions
This file was deleted.
Binary file not shown.

Example/Sources/Views/CameraInputBarAccessoryView.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ extension CameraInputBarAccessoryViewDelegate {
4343
}()
4444

4545
func configure(){
46-
let camera = makeButton(named: "camera")
46+
let camera = makeButton(named: "ic_camera")
4747
camera.tintColor = .darkGray
4848
camera.onTouchUpInside { (item) in
4949
self.showImagePickerControllerActionSheet()
@@ -76,7 +76,7 @@ extension CameraInputBarAccessoryViewDelegate {
7676
if #available(iOS 13.0, *) {
7777
$0.image = UIImage(systemName: "camera.fill")?.withRenderingMode(.alwaysTemplate)
7878
} else {
79-
$0.image = UIImage(named: named)
79+
$0.image = UIImage(named: named)?.withRenderingMode(.alwaysTemplate)
8080
}
8181

8282
$0.setSize(CGSize(width: 30, height: 30), animated: false)

0 commit comments

Comments
 (0)