I have a Tab bar application. I was using XCode 4.3.3. I have upgraded to 4.5.2 with iOS6 stuffs.
My code in the shouldAutorotateToInterfaceOrientation
for each view will check the current device orientation and place all the UI components properly.
But after upgrading to iOS 6, this code is not executing. I have tried for almost one day to fix this, but had no luck.
I have also tried
UIDeviceOrientation interfaceOrientation = [[UIDevice currentDevice] orientation];
in viewLoad
, viewDidLoad
, viewWillAppear
What should I do if I want to check the orientation during the view load and place the UI components to appropriate places during view load. Kindly give your suggestion.
Thanks
you manage Oriantation like this ways:-
and check every time in
ViewWillApear
device Oriantation like:-UPDATE
likely people use checking device
orientation
like below way in putting this line in toViewWillApear
:-and
To check orientation in ios6,you will have to write below methods and also in your info.plist you will have to define which orientation you want...
let me know whether it is working or not!!!
Happy Coding!!!!
At viewDidLoad method you need to check for the same and accordingly you need to write code unless it may affect view if it not in on portrait.
if you want to check which is current orientation, then you just write in prifix.pch below line
then where you want to check orientation ,write condition like below
let me know it is working or not...
Happy coding!