How to change text and background color UIMenu | UIAction (Swift 5)

Viewed 540

Please tell me how to customize this menu? Perhaps another way to do it?

UIMenu

let barMenu = UIMenu(title: "", children: [
        UIAction(title: NSLocalizedString("menu_item_home", comment: "")){
                                action in
                                print("menu_item_home 1")
                            },
                            UIAction(title: NSLocalizedString("menu_item_settings", comment: "")){
                                action in
                                print("menu_item_settings 2")
                                
                                 let settingsStoryboard = UIStoryboard(name: "Settings", bundle: nil)
                                 let settingsController = settingsStoryboard.instantiateViewController(withIdentifier: "SettingsScene") as! SettingsViewController
                                 controller.navigationController?.pushViewController(settingsController, animated: true)
                                 
                            },
        
                            UIAction(title: NSLocalizedString("menu_item_contacts", comment: "")){
                                action in
                                print("menu_item_contacts 3")
                                
                                
                            },
                        
    ])
    
    let navBarMenu = UIBarButtonItem(image: UIImage(systemName: "text.justify"), menu: barMenu)
    navigationItem.rightBarButtonItem = navBarMenu

I need to add a menu to a NavigationBar and customize its appearance. Point in the right direction please

0 Answers
Related