json - Swift2.0 - Create tableView from an array of tuples -
i have array of tuples created json.
typealias tagandlocation = (tag: string, location: string) var resulttuples = [tagandlocation]() (_, subjson) in json { let tag = subjson["tag"].string! let location = subjson["location"].string! let tagloc = (tag: tag, location: location) resulttuples.append(tagloc) }
then i'll use
func tableview(tableview: uitableview, cellforrowatindexpath indexpath: nsindexpath) -> uitableviewcell { let cell = uitableviewcell(style: uitableviewcellstyle.default, reuseidentifier: "cellconcert") //problem here. want indexpath.row position of array of tupple cell.textlabel?.text = resulttuples.[indexpath.row][] return cell }
basically want tableview have content of concerts.
any idea? thanks
Comments
Post a Comment