无法理解以下代码片段:

时间:2019-02-18 18:41:38

标签: enums switch-statement optional-binding

第一种情况是迅速的,而第二种情况则是if let! .connectionName是一个枚举,但“ .connectionName(value)”是什么意思?

枚举ConnectionRow:Int {     案例connectionName     案例serverAddress     案例useProxy     案例提示凭据     案例使用证书 }

枚举ConnectionEntryType {     案例textFieldEntry     大小写切换 }

var connectionOptions:[ConnectionEntryType] = [.textFieldEntry,.textFieldEntry,                                                        .toggle,.toggle,.toggle]

case .connectionName:             如果有的话,让.connectionName(value)= self.connectionOptions [indexPath.row]

0 个答案:

没有答案
相关问题