I would like create an inner shadow on my UIView on iPad like that :

This UIView could change size so I can’t use a simple image to create this kind of shadow.
I have tested with setShadow etc., but it’s only a dropshadow that is created.
Any idea how to create this kind of shadow?
Create the shadow as a transparent layer at a particular size, then create a stretchable image, like this:
You can then put that as the image in a UIImageView with contentMode scale to fit and it will work the way you want.
Lets say your view is called “myView”. You can add the shadow like this:
You can also do most of this in interface builder if you prefer, as long as you create the stretchable image itself in code.