Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. if(section == 0){
  2.  
  3. return storedArr[section].count
  4. }
  5. else if(section == 1){
  6.  
  7. return storedArr[section].count
  8. }
  9. else if(section == 2){
  10.  
  11. return storedArr[section].count
  12. }
  13.  
  14. var arr1:[String] = []
  15. var arr2:[String] = []
  16. var arr3:[String] = []
  17.  
  18. var celebrityArr:[[String]] = []
  19.  
  20. override func viewDidLoad() {
  21. super.viewDidLoad()
  22.  
  23. storedArr = [arr1, arr2, arr3]
  24. }
  25.  
  26.  
  27. override func numberOfSections(in tableView: UITableView) -> Int {
  28.  
  29. return storedArr.count
  30. }
  31.  
  32. override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
  33.  
  34. if(section == 0){
  35.  
  36. return storedArr[section].count
  37. }
  38. else if(section == 1){
  39.  
  40. return storedArr[section].count
  41. }
  42. else if(section == 2){
  43.  
  44. return storedArr[section].count
  45. }
  46. // and so on......
  47. return 0
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement