Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Issue setting UIColor UIView in UITableViewCell ???

$
0
0

I have a project, mind you I've just begun this and am still within my trial - so bear with me. I have a custom UITableViewCell with some UIControls (Ie txtTitle, vwColorIdentifier, txtCustomText, etc). The UITableView that houses these custom cells is bound by a data source returned from our web service. The web service contains colors we use to indicate different types of information returned. The color provided is Hex so I put together a helper method to convert Hex-->RGB. For the source table, GetCell is were I set the color for the UIView (vwColorIdentifier) a such

ColorIdentifier = tableItems[indexPath.Row].BackgroundColor ..

tableItems is a Structure

ColorIndentifier is a public property that does this when set

vwColorIdentifier.BackgroundColor = new UIColor(value.Red / 255,value.Green / 255,value.Blue / 255,value.Alpha / 255)

value is of RGBAColor type --> custom structure with a static FromHex helper method mentioned above.

This all seems to work, RGBA values are correct. However when I run the program colors don't match. Actually they do but only one, everything else appears Black. The only color that does show is a Lime Green.

I'm just wondering if there is something I'm missing here -- given the whole fiasco over float-->byte

Thank you in advance, and I'll provide more information a needed.


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>