【发布时间】:2014-10-13 19:47:51
【问题描述】:
如何删除可选字符
let color = colorChoiceSegmentedControl.titleForSegmentAtIndex(colorChoiceSegmentedControl.selectedSegmentIndex)
println(color) // Optional("Red")
let imageURLString = "http://hahaha.com/ha.php?color=\(color)"
println(imageURLString)
//http://hahaha.com/ha.php?color=Optional("Red")
我只想输出“http://hahaha.com/ha.php?color=Red”
我该怎么办?
嗯....
【问题讨论】: