Created
July 25, 2019 13:31
-
-
Save Denismih/aa3491e92beea877872afd01834fd3a5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// 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