문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top