Reputation: 57
I am creating an app related to photos and would like to get some help from you all.
From photos album view, by clicking a photo it goes to detail view screen for that photo in portrait mode, and if you turn side, you get the this photo in landscape mode. Form this landscape mode, it we move to previous photo album page, I would like to see all photos in PORTRAIT mode but it returns to photos view in Landscape mode. From detail a photo view in landscape mode, if we return to photos album view, how can I program it so that we see the photo album view in Portrait mode, not in landscape mode? Appreciate your help in advance.
Upvotes: 0
Views: 650
Reputation: 17918
In your photo album view controller do this:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
and in your detail view controller do this:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return YES;
}
Upvotes: 3