如果行percentField或valueField不为零,我想做必填字段。
KalkulatinTag是枚举:
enum KalkulationTag: Int {
case skonto = 11
case tage= 22
}
这是KalculationCell ViewController中的代码:
if (self.tag == KalkulationTag.skonto.rawValue){
if ((percentageField.text != nil) || (valueField.text != nil)){
if (self.tag == KalkulationTag.skonto.rawValue){
//here should be required field of eureka
}
}
}
,这里是调用eureka形式的代码:KalkulationRow是Costum行,而IntRow是Eureka行。我想要IntRow()值。
form +++ Section("SKONTO")
<<< IntRow(){
$0.title = "Tage:"
$0.cell.tag = KalkulationTag.tage.rawValue
}
<<< KalkulationRow { row in
row.cell.tag = KalkulationTag.skonto.rawValue
}