UIColor to NSString and Back

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

UIColor to NSString and Back

Andreas Ploetzeneder
Hi,
how can i convert a UIColor into a string and back again?

Best regards

_______________________________________________
MonoTouch mailing list
[hidden email]
http://lists.ximian.com/mailman/listinfo/monotouch
Reply | Threaded
Open this post in threaded view
|

Re: UIColor to NSString and Back

Nic Wise
I've been using this

https://gist.github.com/nicwise/6617756

to do this:

public static UIColor HeaderDark = "1D354E".ToUIColor();

(same as a web hex colour). However, it doesn't deal with alpha, which
would be easy to add. Going the other way should be easy....



On 18 September 2013 11:41, Andreas Ploetzeneder
<[hidden email]> wrote:

> Hi,
> how can i convert a UIColor into a string and back again?
>
> Best regards
>
> _______________________________________________
> MonoTouch mailing list
> [hidden email]
> http://lists.ximian.com/mailman/listinfo/monotouch
>



--
Nic Wise
t.  +44 7788 592 806 | @fastchicken
b. http://www.fastchicken.co.nz/
_______________________________________________
MonoTouch mailing list
[hidden email]
http://lists.ximian.com/mailman/listinfo/monotouch