user3576580
user3576580

Reputation: 32

Changing text color with Swift

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

Upvotes: 1

Views: 735

Answers (1)

Rajeev Bhatia
Rajeev Bhatia

Reputation: 2994

Is cellGrow a UITableViewCell? In that case use this:-

cellGrow.textLabel?.textColor = UIColor.whiteColor()

Upvotes: 2

Related Questions