Advertisement
Guest User

Untitled

a guest
Jan 12th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. import UIKit
  2.  
  3. class ViewController: UIViewController, UITableViewDelegate, UITableViewDataSource {
  4.  
  5. override func viewDidLoad() {
  6. super.viewDidLoad()
  7. // Do any additional setup after loading the view, typically from a nib.
  8. }
  9.  
  10. override func didReceiveMemoryWarning() {
  11. super.didReceiveMemoryWarning()
  12. // Dispose of any resources that can be recreated.
  13. }
  14.  
  15. // MARK: Table view delegate and data source
  16.  
  17. func numberOfSectionsInTableView(tableView: UITableView) -> Int {
  18. return 1
  19. }
  20.  
  21. func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
  22. return 20;
  23. }
  24.  
  25. func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
  26. let cell = tableView.dequeueReusableCellWithIdentifier("reviewCell", forIndexPath: indexPath) as! ReviewTableViewCell
  27. // cell!.label.text = "(indexPath.row)"
  28. cell.reviewerNameLabel.text = "John Smith"
  29. cell.dateLabel.text = "12 months ago"
  30. cell.publisherNameLabel.text = "xyz publisher"
  31. cell.reviewTextLabel.text = "qwertyuiopasdfghjklzxcvbnm1234567890qwertyuiopasdfghjklzxcvbnm1234567890qwertyuiopasdfghjklzxcvbnm1234567890qwertyuiopasdfghjklzxcvbnmqwertyuiop1234567890qwertyuiopasdfghjklzxcvbnm1234567890qwertyuiopasdfghjklzxcvbnm1234567890qwertyuiopasdfghjklzxcvbnm1234567890qwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnm1234567890qwertyuiopasdfghjklzxcvbnm1234567890qwertyuiopasdfghjklzxcvbnm1234567890qwertyuiopasdfghjklzxcvbnmqwertyuiop1234567890qwertyuiopasdfghjklzxcvbnm1234567890qwertyuiopasdfghjklzxcvbnm1234567890qwertyuiopasdfghjklzxcvbnm1234567890qwertyuiopasdfghjklzxcvbnm"
  32. return cell
  33. }
  34.  
  35.  
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement