Show Categories & Top Posts

overlay

When you need to display a view or view controller over every other element in an iOS application, most people go ahead and add it directly to the main window. This may work but can require a bit of tweaking in order to implement your own rotation code if you want to support more than one orientation, and could be later overlaid by things that are supposed to remain behind.

Instead of adding it directly to your existing UIWindow, a better solution is to create a new UIWindow on top of the existing one and then adding things to this UIWindow. It’s recommended to add a UIViewController to this window so all rotations are handled for you.

Picture this… You are looking to rent a house in your favourite tree lined street. Simply pull out your mobile phone, open the new Layar browser, and select the ‘houses’ as your criteria. The mobile phone camera is then enabled, and you are in augmented reality.  The display shows real time digital information on top