问题
I'd like to change the text color of a cell in my table view. If i do this it's not working. In xcode6 beta 1 it works but on the final version of xcode6 it's not working.
Code:
cellGrow.textColor = UIColor.whiteColor()
Error: 'textColor' is unavailable: APIs deprecated as of iOS 7 and earlier are unavailable in Swift
回答1:
Is cellGrow a UITableViewCell? In that case use this:-
cellGrow.textLabel?.textColor = UIColor.whiteColor()
来源:https://stackoverflow.com/questions/26423838/changing-text-color-with-swift