Guest User

Untitled

a guest
Mar 19th, 2018
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
  2.  
  3. let pfile = Bundle.main.path(forResource: "scheduling", ofType: "plist")
  4.  
  5. let indexes = defaults.integer(forKey: "index")
  6. let indexes2 = defaults.integer(forKey: "index2")
  7.  
  8. let stadiumName = stadia[indexes]
  9. let countryName = country[indexes2]
  10.  
  11. let arrays = NSDictionary(contentsOfFile: pfile!)
  12.  
  13. let first = arrays?.value(forKey: stadia[indexes]) as? [[String]]
  14.  
  15. if (titles.text?.contains(stadiumName))!{
  16.  
  17. let returning = first!.count
  18.  
  19. return returning
  20. }
  21. if (titles.text?.contains(countryName))!{
  22.  
  23. let returning = 3
  24.  
  25. return returning
  26. }
  27.  
  28. }
Add Comment
Please, Sign In to add comment