A UIView has a CALayer. That\'s pretty sure. But both seem to provide something that means the same thing.
If I\'d set clipsToBounds=
Some one asked what will happen if clipToBounds is set to false and maskToBounds is set to true or it can be better if someone add screenshots
I stumbled upon the same issue where I wanted to set corner radius and shadow both to the view.
but it is not possible because as soon as I set masksToBound to YES it removes the shadow but clip the content and if I set it to NO it shows the shadow but does not clip the content.
I have made the project which explains it better Understanding the ClipToBound And MasksToBound
I have come to the conclusion that CALayer is not a container but it is simply a class representing a rectangle on the screen with visual content. every drawing done on UIView goes on CALayer which causes the visual content to draw