swift - Change the colour of the text UITextField to the colour typed in it -


i have uitextview , need detect string colour user has typed in it. need change colour of text in uitextfield colour typed user.

for example: if type 'red' in textfield, colour of text should change red.

does know how can done?

thanks!

as starting point, you'd need create mapping of string uicolor.

let colormapping: [string: uicolor] = [     "green": .green,     "white": .white,     //etc... ] 

Comments

Popular posts from this blog

javascript - Create a stacked percentage column -

Optimising Firebase database by automatically overwriting data -

javascript - Angular UI-Grid customTemplate directive causing rows to load slowly/? -