1

I'm adding a UIRefreshControl to my UITableViewController, but I can't figure out the addTarget:action: syntax.

    let refreshControl = UIRefreshControl()
    refreshControl.addTarget(self, action:[what goes here?], forControlEvents: UIControlEvents.ValueChanged)

    self.refreshControl = refreshControl

I tried searching the docs but didn't come up with a working example.

Jeff
  • 4,751
  • 5
  • 31
  • 35
  • For example: `Selector("buttonTapped")` – Adam Jun 08 '14 at 16:43
  • Search again. Hint: it's just a String! – matt Jun 08 '14 at 16:46
  • refreshCntrl = UIRefreshControl() refreshCntrl.tintColor = UIColor.whiteColor() refreshCntrl.attributedTitle = NSAttributedString(string: "Please Wait...") refreshCntrl.addTarget(self, action:"refreshControlValueChanged", forControlEvents: UIControlEvents.ValueChanged) tableView.addSubview(refreshCntrl) – Renish Dadhaniya Jul 19 '14 at 06:22

0 Answers0