Ios 使Eureka DateTimeInLineLow值显示在textLabel而不是detailTextLabel中
因此,我试图自定义Eureka库中的Ios 使Eureka DateTimeInLineLow值显示在textLabel而不是detailTextLabel中,ios,swift,eureka-forms,Ios,Swift,Eureka Forms,因此,我试图自定义Eureka库中的DateTimeInLineLow,以在标题位置而不是细节位置显示所选日期。要替换下图中显示的“占位符”“日期”: 我尝试了很多方法都没有成功,这是我最后一次尝试: <<< DateTimeInlineRow() { row in row.tag = "date" }.cellSetup { cell, row in row.title = "D
DateTimeInLineLow
,以在标题位置而不是细节位置显示所选日期。要替换下图中显示的“占位符”“日期”:
我尝试了很多方法都没有成功,这是我最后一次尝试:
<<< DateTimeInlineRow() { row in
row.tag = "date"
}.cellSetup { cell, row in
row.title = "Date"
}.cellUpdate { cell , row in
if let date = row.value {
row.title = DateFormatter().string(from: date)
}
cell.textLabel?.textColor = row.title == "Date" ? .gray : .black
}
您需要设置单元格.textlab?.text
以使日期字符串成为标题
<<< DateTimeInlineRow() { row in
row.tag = "date"
}.cellSetup { cell, row in
row.title = "Date"
cell.detailTextLabel?.text = ""
}.cellUpdate { cell , row in
if let date = row.value {
cell.textLabel?.text = row.dateFormatter?.string(from: date)
}
cell.textLabel?.textColor = row.title == "Date" ? .gray : .black
cell.detailTextLabel?.text = ""
}
您需要显示更多的代码。“我们不知道这些函数的作用是什么。”我更新了我的问题,添加了一些上下文。