ios - UIButton Action not working in swift -


I have two classes UIVIController and UITableviewcell. In UITableviewcell, I have a button and button action should be in UIViewController.

I click on the Func button (object: AnyObject) {println ("button click")}

  cell.createButton (self) / Pre> 

// UITableViewCell

  func createButton (Representative: AnyObject) Button.addTarget (Representative, Procedure: "Click button:", Control events: UIControlEvents TouchUpInside)}  

But the above code is not working. The 'buttonclick' function is not calling

I had the same problem even a while back "representative" place.

Otherwise try taking a look at this question:

I hope to help.


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -