Forced orientation change does not work sometimes
When a certain button is pressed in my app, the view should change orientation from portrait to landscape. When the user comes back, the view controller should change back to portrait. But sometimes the orientation doesn't change or the wrong view frame is used. Here is my code -(void)btnSignClicked:(CustomSignButton *)btn { isSignButtonClicked = true; if (NSFoundationVersionNumber > NSFoundationVersionNumber_iOS_7_0) { NSNumber *value = [NSNumber numberWithInt:UIInterfaceOrientationLandscapeRight]; [[UIDevice currentDevice] setValue:value forKey:@"orientation"]; } else { [[UIApplication