swift

Pull To Refresh

var refresher:UIRefreshControl!
refresher=UIRefreshControl()
refresher.attributedTitle=NSAttributedString(string: "Pull To Refresh")
refresher.addTarget(self, action: "refresh", forControlEvents: UIControlEvents.ValueChanged)
self.tableView.addSubview(refresher)

func refresh(){
    }

refresher.endRefreshing()