Это то, что я получаю, когда я запускаю мое приложениеКак я могу сохранить размер изображения в таблице?
после я нажимаю на ячейки изображения становятся больше
Мой код, как это
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 - это всего лишь строка URL-адресов изображений. Пожалуйста, помогите
заранее спасибо
Попробуйте установить маски рамки для ImageView и Aspect заполнить изображение – vishnuvarthan
' cell.imageView? .clipsToBounds = true; 'try this – Shahrukh
Также попробуйте заменить вашу ячейку этим - let cell: UITableViewCell = tableView.dequeueReusableCellWithIdentifier ("myCell", forIndexPath: indexPath) как UITableViewCell – vishnuvarthan