的参数列表,我有两个问题:不能调用类型 '双' 初始化与类型 '(字符串?)'
let amount:String? = amountTF.text
amount?.characters.count <= 0
它给错误:
Binary operator '<=' cannot be applied to operands of type 'String.CharacterView.IndexDistance?' (aka 'Optional<Int>') and 'In
let am = Double(amount)
它给错误:
Cannot invoke initializer for type 'Double' with an argument list of type '(String?)'
我不知道如何解决这个问题。