Skip to content

Commit 87fc511

Browse files
added compile conditions for ios7
1 parent d9d3a7f commit 87fc511

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

WYPopoverController/WYPopoverController.m

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,11 @@ - (void)setEmbedInPopover:(BOOL)value
9090

9191
- (void)sizzled_pushViewController:(UIViewController *)viewController animated:(BOOL)animated
9292
{
93-
if (self.isEmbedInPopover && WY_IS_IOS_GREATER_THAN_OR_EQUAL_TO(@"7.0"))
93+
if (self.isEmbedInPopover)
9494
{
95+
#ifdef WY_BASE_SDK_7_ENABLED
9596
viewController.edgesForExtendedLayout = UIRectEdgeNone;
97+
#endif
9698
}
9799

98100
[self sizzled_pushViewController:viewController animated:animated];
@@ -1598,9 +1600,11 @@ - (void)setPopoverNavigationBarBackgroundImage
15981600
UINavigationController *navigationController = (UINavigationController *)viewController;
15991601
navigationController.embedInPopover = YES;
16001602

1601-
if (WY_IS_IOS_GREATER_THAN_OR_EQUAL_TO(@"7.0") && [navigationController viewControllers] && [[navigationController viewControllers] count] > 0)
1603+
if ([navigationController viewControllers] && [[navigationController viewControllers] count] > 0)
16021604
{
1605+
#ifdef WY_BASE_SDK_7_ENABLED
16031606
[(UIViewController *)[[navigationController viewControllers] objectAtIndex:0] setEdgesForExtendedLayout:UIRectEdgeNone];
1607+
#endif
16041608
}
16051609

16061610
[navigationController.navigationBar setBackgroundImage:[UIImage imageWithColor:[UIColor clearColor]] forBarMetrics:UIBarMetricsDefault];

0 commit comments

Comments
 (0)