Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
- return self.searchResults?.count ?? 0
- }
- override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
- let cell = tableView.dequeueReusableCellWithIdentifier("SearchCell") as! SearchTableViewCell
- let gesture = UILongPressGestureRecognizer(target: self, action: #selector(SearchTableViewController.longPressCell(_:)))
- gesture.minimumPressDuration = 0.5
- cell.addGestureRecognizer(gesture)
- cell.article = self.searchResults?[indexPath.row]
- cell.authorButton.tag = indexPath.row
- return cell
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement