S
https://pastebin.com/PBMJYkGV
Size: a a a
S
S
DispatchQueue.main.async {
completionHandler(image)
}
DK
DK
S
DK
S
DK
DK
S
layoutSubviews
нужно кастомный Cell написать?DK
DK
S
S
...Custom UITableViewCell
{ (image) in
// Before assigning the image, check whether the current cell is visible
if let updateCell = tableView.cellForRow(at: indexPath) {
updateCell.imageView?.image = image
updateCell.layoutIfNeeded()
}
}
private class TopChatsCell: UITableViewCell {
override public func layoutSubviews() {
super.layoutSubviews()
if let frameWidth = self.imageView?.frame.width {
self.imageView?.layer.cornerRadius = frameWidth / 2.0
self.imageView?.clipsToBounds = true
}
}
}
DK
S
tableView.register(TopChatsCell.self
public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell
{
let cell: TopChatsCell = tableView.dequeueReusableCell(withIdentifier: cellReuseIdentifier) as! TopChatsCell
S
tableView.cellForRow
возвращает не тоas? TopChatsCell
S
S
DK