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

App crashed when I changed arrowTintColor #166

Open
168-7cm opened this issue Nov 20, 2021 · 0 comments
Open

App crashed when I changed arrowTintColor #166

168-7cm opened this issue Nov 20, 2021 · 0 comments

Comments

@168-7cm
Copy link

168-7cm commented Nov 20, 2021

I wanna change arrow tintClor like below. but crashed at self.menuArrow.tintColor = color

error message is Thread 1: Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value

here is my code

private var menuView: BTNavigationDropdownMenu!

 private func setupDropDownMenu() {
        let items = Artist.allCases.map { $0.rawValue }
        menuView = BTNavigationDropdownMenu(navigationController: self.navigationController, containerView: self.navigationController!.view, title: items.first!, items: items)
        menuView.cellHeight = 45
        menuView.arrowPadding = 15
        menuView.animationDuration = 0.4
        menuView.cellBackgroundColor = .white
        menuView.cellTextLabelColor = .black
        menuView.cellTextLabelFont = UIFont.boldSystemFont(ofSize: 14)
        menuView.shouldKeepSelectedCellColor = true
        menuView.cellTextLabelAlignment = .left
        menuView.cellSelectionColor = .systemGray2
        menuView.checkMarkImage = nil
        //menuView.arrowTintColor = .white
        menuView.didSelectItemAtIndexHandler = { [weak self] index in
            self?.selectedArtist = Artist.allCases[index]
            self?.pagingViewController.reloadData()
        }
        self.navigationItem.titleView = menuView
    }

please help me!

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

1 participant