iPhone 3.1.3: All my UIButtons and UITableRowViews are now gray
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 somethin开发者_运维百科g simple that caused it in the first place.
How did I break this?
Thanks very much.
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").
You could select all of them (Cmd+A or drag a rectangle) and change the background color back to white.
精彩评论