继承自uiview
class TapAddShowImageView: UIView {
}
重写初始化方法
//code
override init(frame: CGRect) {
super.init(frame: frame)
setupSubviews()
}
//xib
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
setupSubviews()
}
重写布局方法
override func layoutSubviews() {
self.showImageView?.frame = self.frame
}