How to change UITableView Label to mutiple color

Multi tool use


How to change UITableView Label to mutiple color
How do I change the text in my UITableView to two different colors?
let highest = (history[indexPath.row].highest!) //Red color
let lowest = (history[indexPath.row].lowest!) //Green color
cell.detailTextLabel?.text = "$(highest)/$(lowest)"
return cell
Thank you!
1 Answer
1
You can prepare a custom view with two labels, one for highest, other for lowest.
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
use attributed text for this use two colors one for lowest and other highest
– Vinodh
3 mins ago