I do not understand how to remove a shadow that was added to a view. I add to my view in initWithFrame a shadow in this way:
initWithFrame
self.layer.borderWidth
I guess you could use the shadowOpacity property of your CALayer.
shadowOpacity
CALayer
So this should work:
self.layer.shadowOpacity = 0;
See the CALayer's shadowOpacity documentation page
And to show your shadow use:
self.layer.shadowOpacity = 1.0;