Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xCode 13, iOS 15 Wrong NavBar background color #690

Closed
vladggordiichuk opened this issue Sep 9, 2021 · 8 comments
Closed

xCode 13, iOS 15 Wrong NavBar background color #690

vladggordiichuk opened this issue Sep 9, 2021 · 8 comments

Comments

@vladggordiichuk
Copy link

Please, adjust YPImagePicker to work on iOS 15.

Simulator Screen Shot - iPhone 12 Pro - 2021-09-09 at 18 45 23

@justdan0227
Copy link

Seeing this as well. Please update

@justdan0227
Copy link

I did notice that if you add

let picker = YPImagePicker(configuration: config)
picker.navigationBar.tintColor = .white

that you at least get the CANCEL button back. However, can't get the Library Titles (which is a button) to show up yet?

@justdan0227
Copy link

And to fix the library title color (for now) inside of

open class YPPickerVC:

you need to change

func setTitleViewWithTitle(aTitle: String) {
        let titleView = UIView()
        titleView.frame = CGRect(x: 0, y: 0, width: 200, height: 40)
        
        let label = UILabel()
        label.text = aTitle
        label.textColor = .white //  <-----

@s4cha
Copy link
Member

s4cha commented Sep 24, 2021

Hey, this is an annoying change on Xcode13/iOS15. Until we update the library. here is the fix:

 let navBarAppearance = UINavigationBarAppearance()
navBarAppearance.configureWithOpaqueBackground()
picker.navigationBar.scrollEdgeAppearance = navBarAppearance

source: https://developer.apple.com/forums/thread/682420

@KeWangKW
Copy link

KeWangKW commented Oct 6, 2021

I solved the problem by modifying the code

image

EinfachHans added a commit to EinfachHans/cordova-plugin-advanced-imagepicker that referenced this issue Oct 18, 2021
@sahbazali
Copy link
Contributor

sahbazali commented Nov 10, 2021

If you use YPImagePicker in multiple place you can add convenience init method and use it for wrapping navigation bar changes. (At least until the problem being fixed inside framework)

extension YPImagePicker {
    convenience init(pickerConfig: YPImagePickerConfiguration) {
        self.init(configuration: pickerConfig)
        if #available(iOS 15.0, *) {
            let appearance = navigationBar.standardAppearance
            appearance.configureWithOpaqueBackground()
            navigationBar.scrollEdgeAppearance = appearance
        }
    }
}

@NikKovIos
Copy link
Collaborator

Please check last release. I don't have such a problem in ios 15.

@NikKovIos
Copy link
Collaborator

Feel free to reopen if still exist with link to this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants