let yearNumber:String?=(yearText.text)
if let yearNumber=yearNumber{ if yearNumber.characters.count>0{ }
}是需要这样吗 还是有简单方法