I have a custom UITableViewCell created in a xib that contains an "inner" view that I set a shadow on. I set the shadow in tableView willDisplayCell and it works initially
The problem is, when I scroll down, then back up, the shadow is gone (EDIT: it reappears when reloadData is called). What is happening here? Why isn't my shadow always shown?
More info:
- I've tried setting the shadow in cellForRowAtIndexPath: and I get the same result.
- I'm setting the cells selectionStyle and backgroundColor just prior to setting the shadow.
- I'm also curving the edge of the inner view just before setting the shadow (and this works all the time.. even after scrolling).
- My tableView is in a storyboard and I register the custom cell nib in my view controllers viewDidLoad.
shadowOffsetto improve shadow drawing performance. Did you try this? - Mundi