File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -149,12 +149,18 @@ - (void)dealloc
149149
150150- (BOOL )shouldAutorotateToInterfaceOrientation : (UIInterfaceOrientation)interfaceOrientation
151151{
152- if (self.detailViewController )
153- {
152+ if (self.masterViewController && self.detailViewController ) {
153+ return [self .masterViewController shouldAutorotateToInterfaceOrientation: interfaceOrientation] && [self .detailViewController shouldAutorotateToInterfaceOrientation: interfaceOrientation];
154+ }
155+ else if (self.masterViewController ) {
156+ return [self .masterViewController shouldAutorotateToInterfaceOrientation: interfaceOrientation];
157+ }
158+ else if (self.detailViewController ) {
154159 return [self .detailViewController shouldAutorotateToInterfaceOrientation: interfaceOrientation];
155160 }
156-
157- return YES ;
161+ else {
162+ return YES ;
163+ }
158164}
159165
160166
You can’t perform that action at this time.
0 commit comments