How to change UITableView Label to mutiple color

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


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!





use attributed text for this use two colors one for lowest and other highest
– Vinodh
3 mins ago




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.

Popular posts from this blog

Arduino Mega cannot recieve any sketches, stk500_recv() programmer is not responding

Visual Studio Code: How to configure includePath for better IntelliSense results

C++ virtual function: Base class function is called instead of derived