ios - How to loop over data in a UITableView in Swift -
ios - How to loop over data in a UITableView in Swift -
i’m using alamofire library http request.
i know how loop in plain text field:
for alternative in json["options"] { allow opts = json["options"]["is_selected"].string if json["options"][ctr]["is_selected"] == 1 { if json["options"][ctr]["id"] == "8" { self.emailswitch.on = true self.unameswitch.on = true } } println(json["options"][ctr]["id"]) ctr++ } but how do in table view?
you can iterate on uitableview this:
for section in 0..<tableview.numberofsections() { row in 0..<tableview.numberofrowsinsection(section) { allow indexpath = nsindexpath(forrow: row, insection: section) var cell = tableview.cellforrowatindexpath(indexpath) // want cell } } ios uitableview swift loops foreach
Comments
Post a Comment