Advertisement
Guest User

Untitled

a guest
Jun 27th, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
  2. return self.searchResults?.count ?? 0
  3. }
  4.  
  5. override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
  6. let cell = tableView.dequeueReusableCellWithIdentifier("SearchCell") as! SearchTableViewCell
  7. let gesture = UILongPressGestureRecognizer(target: self, action: #selector(SearchTableViewController.longPressCell(_:)))
  8. gesture.minimumPressDuration = 0.5
  9. cell.addGestureRecognizer(gesture)
  10. cell.article = self.searchResults?[indexPath.row]
  11. cell.authorButton.tag = indexPath.row
  12.  
  13. return cell
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement