I have one viewcontroller in application that supports landscape and portrait orientations.
On a button click, a popup appears where I should enter the nam
Try by adding below code to your viewcontroller's viewDidAppear method
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
[[UIDevice currentDevice] setValue:@(UIDeviceOrientationLandscapeLeft) forKey:@"orientation"];
[[UIDevice currentDevice] setValue:@(self.interfaceOrientation) forKey:@"orientation"];
}