我有自定义的tableViewCell。在它的单元格中,我有自定义的分隔符。工作逻辑应该是这样的:
现在它的工作方式是:
override func awakeFromNib() {
customSeparator.backgroundColor = .lightGray
customSeparator.frame.size.height = 1.0
}
func textFieldDidBeginEditing(_ textField: UITextField) {
customSeparator.backgroundColor = .black
customSeparator.frame.size.height = 2.0
}
所以,为什么会这样,请告诉我,PLZ