Skip to content

App crashed when I changed arrowTintColor #166

Open
@168-7cm

Description

@168-7cm

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions