I have to control one screen as portrait, another screen as landscape in the same application.
In iOS 6 setOrientation is now deprecated which means that it will not work anymore as it was in iOS 5. Please use the official developer documents from Apple in order to find alternative ways of programmatical orientation adjustment.