This is what I get when I launch my app
after I click on the cell the images get bigger
My Code is like this
override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCellWithIdentifier("myCell", forIndexPath: indexPath)
// Configure the cell...
cell.imageView?.sd_setImageWithURL(NSURL(string: imageArray[indexPath.row]), placeholderImage:UIImage(named: "pin.png"))
cell.imageView?.frame = CGRectMake(0, 0, 50, 50)
return cell
}
imageArray is just string of image URLs. Please help
thanks in advance
You can try to use the contant mode property:
imageViewObject.contentMode = UIViewContentMode.ScaleToFill
or
imageViewObject.contentMode = UIViewContentMode.ScaleAspectFit
or
imageViewObject.contentMode = UIViewContentMode.ScaleAspectFill