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

Popular posts from this blog

Using Android Volley to post an array to PHP -

python - How to add an model instance to a django queryset? -

angularjs - No 'Access-Control-Allow-Origin' error from local domain to public API -