阅读背景:

从文本字段中展开两个选项

来源:互联网 

I'm writing a simply app that includes calculating an area from user input of ID and OD in text fields. The label for the area is hidden until both ID and OD are entered. I'm having trouble unwrapping the optionals of ID and OD text field, to avoid error if user presses "return" without putting any number. This is what I wrote, which I thought would not run the area calculation codes unless both fields contain numbers (I've restricted keyboard to numbers only), but when I press "return" in either field without entering anything, I'm still getting the "nil optional error" in the area calculation code.I'm writing a simply app that includes calculat




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: