Ive checked around stackOverFlow for a solution but it seemed like it still didnt work for my code.. my detailTextLabel still does not show up :(
Wondering what I am doing wrong, here's my code
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
var cell = UITableViewCell()
// display our ranked data
cell.textLabel?.text = "\(championListInGame[indexPath.row])"
if let url = NSURL(string: "http://ddragon.leagueoflegends.com/cdn/img/champion/loading/\(championListInGame[indexPath.row])_0.jpg"){
if let urlData = NSData(contentsOfURL: url){
cell.imageView?.contentMode = UIViewContentMode.ScaleAspectFit
cell.imageView?.image = UIImage(data: urlData)
}
}
if victory[indexPath.row] == true {
cell.backgroundColor = UIColor.blueColor()
cell.detailTextLabel?.text = " "+"victory!"
} else {
cell.backgroundColor = UIColor.redColor()
cell.detailTextLabel?.text = " "+"defeat!"
}
return cell
}
my victory nor defeat showed up in my table cells however, the color, image, and text all showed up just as the way I wanted.
On the side note, can someone teach me how do I choose colors like baby blue or baby red ? the default red and blue is too strong for my app :(
Thanks for the help guys!