Skip to content

Instantly share code, notes, and snippets.

@Denismih
Created July 25, 2019 13:31
Show Gist options
  • Save Denismih/aa3491e92beea877872afd01834fd3a5 to your computer and use it in GitHub Desktop.
Save Denismih/aa3491e92beea877872afd01834fd3a5 to your computer and use it in GitHub Desktop.
//
// RoundedImageTableViewCell.swift
// Mangosta
//
// Created by Denis Mikhaylovskiy on 25/07/2019.
//
import UIKit
class RoundedImageTableViewCell: UITableViewCell {
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
}
override func layoutSubviews() {
super.layoutSubviews()
self.imageView?.frame = CGRect(x: 10, y: 5, width: 40, height: 40)
self.imageView?.contentMode = .scaleAspectFill
self.imageView?.layer.cornerRadius = (self.imageView?.bounds.height)! / 2
self.imageView?.layer.masksToBounds = true
self.textLabel?.frame = CGRect(x: 60, y:15, width: self.frame.width - 70, height: 20)
// self.detailTextLabel?.frame = CGRectMake(60, 20, self.frame.width - 45, 15)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment