Advertisement
Guest User

Untitled

a guest
Feb 26th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. @IBOutlet weak var tableView: UITableView!
  2.  
  3.  
  4.  
  5. var mainController = ViewController()
  6.  
  7. var movie = ViewController().self.movieArray[0]
  8.  
  9.  
  10.  
  11.  
  12.  
  13. var titles = ["Title", "Release Date","Genres","OverView"]
  14.  
  15.  
  16.  
  17. override func viewDidLoad() {
  18. super.viewDidLoad()
  19. print(movie)
  20. // Do any additional setup after loading the view.
  21. }
  22.  
  23.  
  24.  
  25. func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
  26. return titles.count
  27. }
  28. func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
  29. let cell = self.tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath) as! DetailsCustomcell
  30.  
  31. cell.detailTitle.text = titles[indexPath.row]
  32. if indexPath.row == 0{
  33. cell.detailContent.text = ""
  34. }
  35. if indexPath.row == 1{
  36. cell.detailContent.text = ""
  37. }
  38. if indexPath.row == 2{
  39. cell.detailContent.text = "Movie genre´s is not fixed yet"
  40. }
  41. if indexPath.row == 3{
  42. cell.detailContent.text = ""
  43. }
  44. return cell
  45. }
  46.  
  47.  
  48.  
  49.  
  50.  
  51. /*
  52. // MARK: - Navigation
  53.  
  54. // In a storyboard-based application, you will often want to do a little preparation before navigation
  55. override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
  56. // Get the new view controller using segue.destinationViewController.
  57. // Pass the selected object to the new view controller.
  58. }
  59. */
  60.  
  61. @IBOutlet weak var detailTitle: UILabel!
  62.  
  63. @IBOutlet weak var detailContent: UILabel!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement