Swift: left button SLKTextViewController not visible

I am using SLKTextViewController to create a dockview chat with two buttons.

I want the left button with UIPopOverController execute photos and so on.

 class Message: SLKTextViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. self.textView.placeholder = "Message" self.textView.placeholderColor = UIColor.lightGrayColor() self.leftButton.setImage(UIImage(named: "icn_upload"), forState: UIControlState.Normal) self.leftButton.tintColor = UIColor.grayColor() self.rightButton.setTitle("Send", forState: UIControlState.Normal) self.textInputbar.autoHideRightButton = true self.textInputbar.maxCharCount = 31 self.textInputbar.counterStyle = SLKCounterStyle.Split self.typingIndicatorView.canResignByTouch = true self.bounces = true self.shakeToClearEnabled = true self.keyboardPanningEnabled = true self.inverted = false 

I added that he appears, but he does not

  self.leftButton.hidden = false } 
+4
source share
1 answer

If you need to display the left button, just enter it.

 self.leftButton.addTarget(self, action: Selector("cameraPressed"), forControlEvents: UIControlEvents.TouchUpInside) self.leftButton.setImage(UIImage.init(named:"CameraIcon"), forState: UIControlState.Normal) 

You can then add the UIPopOverController to the camearPressed function. (I would prefer the UIAlertController style)

+1
source