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

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -