im new to the iPhone SDK and development. I work for a company that is looking to create some proof-of-concept iPhone applications and one of the requests/potential features was using a video file as the background for the application.
I understand that from a user experience pov this isnt necaserrily classed as best practice however if I can at least prove that this can be done whilst also listing the pro’s and con’s of doing so this would benefit me greatly.
Any help on this subject is greatly appreciated 🙂
Regards,
Wayne
You should be able to implement this through Quartz Core using layers (see the CALayer class documentation). Indeed, you can have layers hierarchies.
However, you should carefully, as already stated, take into account the heavy load. For just a few seconds, it may be acceptable though.
Basically you associate each UIView to a different layer, then the layers are rendered together providing a single, composite layer. Besides, you can also apply transforms and animations to layers.
You need to import the QuartzCore header and do something like
Then, when myView appears on the screen, all the sublayers are merged together and rendered on screen. What happens is that each view renders its layer, while myViewLayer is rendered merging together the two layers.
You can have as many layers as you like. You can create an arbitrary hierarchy by using the CALayer methods