-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
1、不建议再 didSet 里面 initViews , 不看源码根本不知道为什么会多出那么多 table ....
public var popData:[(icon:String,title:String, id: String)]! = [(icon:String,title:String, id: String)](){
didSet{
//计算行高
rowHeightValue = (self.myFrame.height - arrowViewHeight)/CGFloat(popData.count)
}
}
2、touchesBegan 会导致连 Table 的 Cell 都点不了, 问题调的很蛋疼...
override public func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
super.touchesBegan(touches, with: event)
if touches.first?.view?.tag != 1 {
dismiss()
}
}
建议给 tableCell 的 content 添加 tag = 1
override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
//...
self.contentView.tag = 1
//...
}
唉 ... 调试控件的时间自己都写一个出来了 😓
349299341
Metadata
Metadata
Assignees
Labels
No labels