Question

Not sure how this happened, but all of the UITableRowViews and roundrect-style UIButtons in my app—spanning a dozen or so views—are now all gray instead of white.

Unfortunately, I have no idea how this happened. (In fact, I had no idea it was possible to do this.) Explicitly setting the button's or tableRowView's background color to white gets it back to normal. But it'll be a lot of work to do that to every one of my views...and I'd rather not have to do it since there's obviously something simple that caused it in the first place.

How did I break this?

Thanks very much.

Was it helpful?

Solution

Bizarre: if you add a static method into some UIColor category and call it +(UIColor*)tableViewBackground, it'll change all your tables and buttons to that color.

Must interfere with some hidden method in Apple's UIColor implementation.

I fixed my problem by simply using a different name ("viewBackgroundColor").

OTHER TIPS

You could select all of them (Cmd+A or drag a rectangle) and change the background color back to white.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top