Self. Root. View. layer. shadowcolor =[Uicolor bluecolor]. cgcolor; self. Root. View. layer. shadowopacity=0.4f; Self. Root. View. layer. shadowoffset= Cgsizemake (-12.0,1.0f); Self. Root. View. layer. shadowradius=7.0f; Self. Root. View. layer. maskstobounds= No;
Use the aboveCodeAdding a shadow to an animated view causes freezing.
You need to set the path:
[Uibezierpath bezierpathwithrect: _ toview. bounds]. cgpath;
Self. Root. View. layer. shadowpath =[Uibezierpath bezierpathwithrect: Self. Root. View. bounds]. cgpath; self. Root. View. layer. shadowcolor=[Uicolor bluecolor]. cgcolor; self. Root. View. layer. shadowopacity=0.4f; Self. Root. View. layer. shadowoffset= Cgsizemake (-12.0,1.0f); Self. Root. View. layer. shadowradius=7.0f; Self. Root. View. layer. maskstobounds= No;
Choppy disappears.
Check: http://blog.csdn.net/mkhgg/article/details/7286282