Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/swift/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 如何从内联行(如DateInlineLow)中清除值?_Ios_Swift_Swift3_Eureka Forms - Fatal编程技术网

Ios 如何从内联行(如DateInlineLow)中清除值?

Ios 如何从内联行(如DateInlineLow)中清除值?,ios,swift,swift3,eureka-forms,Ios,Swift,Swift3,Eureka Forms,如果使用DateInLineLow或任何其他内联行,则无法清除该值。如何做到这一点?我一直在研究你的问题,我将以dateinlineow为例 如果要清除该值 <<< DateInlineRow(){ $0.tag = "inlineDateTime" }.cellSetup({ (dateCell, dateTimeRow) in // Setup the start date let currentDate

如果使用DateInLineLow或任何其他内联行,则无法清除该值。如何做到这一点?

我一直在研究你的问题,我将以
dateinlineow
为例

如果要清除该值

   <<< DateInlineRow(){
        $0.tag = "inlineDateTime"
        }.cellSetup({ (dateCell, dateTimeRow) in
        // Setup the start date
        let currentDate = NSDate() as Date
        dateTimeRow.dateFormatter?.dateStyle = .short
        dateTimeRow.dateFormatter?.timeStyle = .short
        dateTimeRow.value = currentDate
        dateCell.textLabel?.text = "" //if you want clear the value in creation
    }).onCellSelection({ (cell, row) in
        row.cell.textLabel?.text = "" //if you want clear the value in cell selection
    }).onChange({ (row) in
        row.cell.textLabel?.text = "" //if you want clear the value on value change
    })

“无法清除值”是什么意思?你需要做什么?如果我使用DateInLineLow并从选择器中选择一个日期。然后如何清除/删除该值,使其为空?我要删除日期值。选择后是否清除?这就是你需要的吗?检查我的答案并给我一些反馈,尊敬的,你可以这样做。我更喜欢有一个像小十字按钮的功能,你可以有一个常规的输入字段。比如说,用户有一个保存了数据的表单。其中一个字段是带有日期的DateInLineLow。现在,用户希望删除该日期值并保存。请使用“按标记搜索”部分@sverin
if let dateTimeInlineRow = self.form.rowBy(tag: "inlineDateTime") as? DateInlineRow
                    {
                        if let baseCellText = dateTimeInlineRow.baseCell as? Cell<Date>
                        {
                            baseCellText.row.value = nil
                            baseCellText.update()
                        }
                    }