Material: Toolbar right items are not shown

Hi!

I have a problem using your toolbar component. It occurred since I’ve update your framework to version 1.41.8 (the last update atm). For the moment, I went back to 1.41.6 and my right control is displayed correctly.

Maybe I’m not using it correctly. Just in case, here is my code:

    private func prepareToolbar() {
        toolbar = Toolbar()
        shareView.addSubview(toolbar)

        // Title label.
        toolbar.titleLabel.text = "Share \(node.loadName()!)"
        toolbar.titleLabel.textColor = MaterialColor.white

        var image: UIImage? = MaterialIcon.cm.share

        // Menu button.
        let mailButton: IconButton = IconButton()
        mailButton.pulseColor = MaterialColor.white
        mailButton.tintColor = MaterialColor.white
        mailButton.setImage(image, forState: .Normal)
        mailButton.setImage(image, forState: .Highlighted)

        // Search button.
        image = MaterialIcon.cm.close
        let closeButton: IconButton = IconButton()
        closeButton.pulseColor = MaterialColor.white
        closeButton.tintColor = MaterialColor.white
        closeButton.setImage(image, forState: .Normal)
        closeButton.setImage(image, forState: .Highlighted)
        closeButton.addTarget(self, action: #selector(ShareViewControllerMaterial.closeButtonPressed), forControlEvents: .TouchUpInside)

        toolbar.backgroundColor = MaterialColor.blue.base
        toolbar.leftControls = [mailButton]
        toolbar.rightControls = [closeButton]
    }

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 21 (11 by maintainers)

Most upvoted comments

This has been solved and will be fixed in the next release. I will leave the issue up until that release. Once again, thanks for bringing it to our attention.

Thank you very much for your help, I’ll use your suggestions 👍