在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
import UIKit
class MyTableViewCell: UITableViewCell {
var imageV: UIImageView?
var titleLabel: UILabel?
required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder)
}
override init(style: UITableViewCellStyle, reuseIdentifier: String?) { super.init(style: style, reuseIdentifier: reuseIdentifier)
setUp()
}
func setUp() { self.imageV = UIImageView.init(frame: CGRect.init(x: 10, y: 10, width: 80, height: 80)) self.titleLabel = UILabel.init(frame: CGRect.init(x: 100, y: 0, width: 200, height: 100)) self.contentView.addSubview(self.imageV!) self.contentView.addSubview(self.titleLabel!) }
override func awakeFromNib() { super.awakeFromNib() // Initialization code
}
override func setSelected(_ selected: Bool, animated: Bool) { super.setSelected(selected, animated: animated)
// Configure the view for the selected state }
} |
请发表评论