@IBAction func ChangeHeight(sender: AnyObject) {
heigh.value = Float(Int(heigh.value))
var sg = sender as UISlider
heighshow.text = toString(Int(sg.value)) + "CM"
}
感觉这样写貌似更简洁些!如果不转回去,日后涉及到录入数据库,也是需要转换的,不然无法知道用户选择的准确身高值
heigh.value = Float(Int(heigh.value))
var sg = sender as UISlider
heighshow.text = toString(Int(sg.value)) + "CM"
}
感觉这样写貌似更简洁些!如果不转回去,日后涉及到录入数据库,也是需要转换的,不然无法知道用户选择的准确身高值
2015-02-06