Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Incorrect UISwitch appearance in UITableViewCell

I created a sectioned UITableView and added a custom cell that includes a UISwitch. All this is done using the storyboard. However, when running the App (Simulator/device), the UISwitch does not look as expected (c.f. attached screenshot). Any ideas on why this happened are highly appreciated (XCode 4.5.2, iOS 6.0.1). Note: creating a new UIStoryboard does not solve the problem.

UISwitch in custom UITableViewUISwitch settings

like image 701
tilo Avatar asked Nov 04 '22 07:11

tilo


1 Answers

I just got the answer to my question: I created a category on UIImageView that sets custom layer properties (e.g. shadowRadius). Setting a breakpoint on the corresponding UIImageView method, it revealed that the UISwitch called it.

I did not get to this point earlier, as I only had a single UIImageView before (and this one was supposed to have custom properties). Thanks for all your comments!

like image 169
tilo Avatar answered Nov 14 '22 20:11

tilo