Skip to content

Commit 73a04df

Browse files
committed
fix close button
1 parent 2eec150 commit 73a04df

File tree

2 files changed

+2
-21
lines changed

2 files changed

+2
-21
lines changed

ios/CustomPhotoPicker/CustomPhotoPickerViewController.swift

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,29 +17,10 @@ class CustomPhotoPickerViewController: TLPhotosPickerViewController {
1717

1818
override func makeUI() {
1919
super.makeUI()
20-
let leftBarButtonItem = UIBarButtonItem.init(barButtonSystemItem: .stop, target: nil, action: #selector(customAction))
21-
leftBarButtonItem.tintColor = .black
22-
self.customNavItem.leftBarButtonItem = leftBarButtonItem
20+
self.customNavItem.leftBarButtonItem?.tintColor = .black
2321
self.customNavItem.rightBarButtonItem?.tintColor = MultipleImagePickerConfigure.selectedColor
2422
}
2523

26-
@objc func customAction() {
27-
DispatchQueue.main.async {
28-
self.getTopMostViewController()?.dismiss(animated: true, completion: nil)
29-
}
30-
}
31-
32-
func getTopMostViewController() -> UIViewController? {
33-
var topMostViewController = UIApplication.shared.keyWindow?.rootViewController
34-
35-
while let presentedViewController = topMostViewController?.presentedViewController {
36-
topMostViewController = presentedViewController
37-
}
38-
39-
return topMostViewController
40-
}
41-
42-
4324
override func viewWillAppear(_ animated: Bool) {
4425
super.viewWillAppear(animated)
4526
self.navigationController?.setNavigationBarHidden(true, animated: true)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@baronha/react-native-multiple-image-picker",
3-
"version": "0.2.7",
3+
"version": "0.2.8",
44
"description": "react-native-multiple-image-picker enables application to pick images and videos from multiple smart album in iOS/Android, similar to the current facebook app.",
55
"main": "lib/commonjs/index",
66
"module": "lib/module/index",

0 commit comments

Comments
 (0)