Skip to content

Commit c4e3090

Browse files
committed
add macro to make Xcode 4.6 happy
1 parent f26009d commit c4e3090

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

SIAlertView/SIAlertView.m

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
static SIAlertBackgroundWindow *__si_alert_background_window;
3737
static SIAlertView *__si_alert_current_view;
3838

39-
39+
#ifdef __IPHONE_7_0
4040
@interface UIWindow (SIAlert_StatusBarUtils)
4141

4242
- (UIViewController *)viewControllerForStatusBarStyle;
@@ -78,6 +78,7 @@ - (UIViewController *)viewControllerForStatusBarHidden
7878
}
7979

8080
@end
81+
#endif
8182

8283

8384
@interface SIAlertView ()
@@ -209,12 +210,14 @@ - (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrie
209210
[self.alertView invalidateLayout];
210211
}
211212

213+
#ifdef __IPHONE_7_0
212214
- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
213215
{
214216
if ([self respondsToSelector:@selector(setNeedsStatusBarAppearanceUpdate)]) {
215217
[self setNeedsStatusBarAppearanceUpdate];
216218
}
217219
}
220+
#endif
218221

219222
- (NSUInteger)supportedInterfaceOrientations
220223
{
@@ -231,6 +234,7 @@ - (BOOL)shouldAutorotate
231234
return YES;
232235
}
233236

237+
#ifdef __IPHONE_7_0
234238
- (UIStatusBarStyle)preferredStatusBarStyle
235239
{
236240
UIWindow *window = self.alertView.oldKeyWindow;
@@ -248,6 +252,7 @@ - (BOOL)prefersStatusBarHidden
248252
}
249253
return [[window viewControllerForStatusBarHidden] prefersStatusBarHidden];
250254
}
255+
#endif
251256

252257
@end
253258

0 commit comments

Comments
 (0)