The motion effect applied to the background of your iphone is accomplished using the UIInterpolatingMotionEffect. This is a very subtle effect that simply moves an object, in this case a UIImage, along the X and Y Axis And while it doesnt have to be both the X and Y axis, moving the object along both will produce the wonderful parallax effect.
To begin with create an image which is larger than the view. In this case Ill make my image 704 X 1250 for the @2x version and 352 X 625 for the 1x version. Choose or create an image with some detail so that the movement is noticeable. If you do not have an image to hand, you can find the necessary images in the project which is linked to at the bottom of this post. Your 1x version should be named in the format of image.png and the 2x version should be called [email protected]. [Read more…]