I have a UITableView displaying a list of Cities. I want to separate them by State. I can\'t seem to figure out how to get it to pick the right items out of my Array. If Sectio
Swift 3, 4 and 4.2
Using Switch
switch indexPath.section {
case 0:
print("Write your code for section number one.")
case 1:
print("Write you code for section number two")
default:
return
}
Using if else
if indexPath.section == 0 {
print("Write your code for section number one.")
} else if indexPath.section == 1 {
print("Write your code for section number two.")
}