File tree Expand file tree Collapse file tree 1 file changed +22
-2
lines changed
Classes/NavigationController Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -129,6 +129,26 @@ - (void)cancelProgress
129
129
}
130
130
}
131
131
132
+ #pragma mark Orientation
133
+
134
+ - (UIInterfaceOrientation)currentDeviceOrientation
135
+ {
136
+ UIInterfaceOrientation orientation;
137
+
138
+ // Define "M13_APP_EXTENSIONS" Preprocessor Macro for App Extension target
139
+ #if defined(M13_APP_EXTENSIONS)
140
+ if ([UIScreen mainScreen ].bounds .size .width < [UIScreen mainScreen ].bounds .size .height ) {
141
+ orientation = UIInterfaceOrientationPortrait;
142
+ } else {
143
+ orientation = UIInterfaceOrientationLandscapeLeft;
144
+ }
145
+ #else
146
+ orientation = [UIApplication sharedApplication ].statusBarOrientation ;
147
+ #endif
148
+
149
+ return orientation;
150
+ }
151
+
132
152
#pragma mark Drawing
133
153
134
154
- (void )showProgress
@@ -144,7 +164,7 @@ - (void)showProgress
144
164
145
165
- (void )updateProgress
146
166
{
147
- [self updateProgressWithInterfaceOrientation: [UIApplication sharedApplication ].statusBarOrientation ];
167
+ [self updateProgressWithInterfaceOrientation: [self currentDeviceOrientation ] ];
148
168
}
149
169
150
170
- (void )updateProgressWithInterfaceOrientation : (UIInterfaceOrientation)interfaceOrientation
@@ -213,7 +233,7 @@ - (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrie
213
233
214
234
- (void )drawIndeterminate
215
235
{
216
- [self drawIndeterminateWithInterfaceOrientation: [UIApplication sharedApplication ].statusBarOrientation ];
236
+ [self drawIndeterminateWithInterfaceOrientation: [self currentDeviceOrientation ] ];
217
237
}
218
238
219
239
- (void )drawIndeterminateWithInterfaceOrientation : (UIInterfaceOrientation)interfaceOrientation
You can’t perform that action at this time.
0 commit comments