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

service - Android MediaPlayer calls onCompletion before it already finished -

javascript - Training Neural Network to play flappy bird with genetic algorithm - Why can't it learn? -

javascript - Create a stacked percentage column -