Reputation: 400
Below is my code:
var arrCategory:[NSString] =
["Australia","Austria","Belgium","Brazil","Cameroon","Canada","Chile","China","Denmark","Argentina"]
The strings given in above array are the name of images.
Upvotes: 2
Views: 492
Reputation: 2540
Replace your code with:
cell.imageView?.image = UIImage(named: "\(self.arrCategory[indexPath.row]).png")
cell.LblName.text = "\(self.arrCategory[indexPath.row])"
Upvotes: 3
Reputation: 400
My Question Of Answer i find out and is Here:
cell.imgView.image = NSImage(named:self.arrCategory[indexPath.item])
cell.lbl.stringValue = arrlbl[indexPath.item] as String
Upvotes: 1