From 87fc511701ebd46f7195b73262b59882f5881ef3 Mon Sep 17 00:00:00 2001 From: Nicolas CHENG Date: Fri, 11 Oct 2013 06:25:40 +0200 Subject: [PATCH] added compile conditions for ios7 --- WYPopoverController/WYPopoverController.m | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/WYPopoverController/WYPopoverController.m b/WYPopoverController/WYPopoverController.m index 24cf8122..f2d63900 100644 --- a/WYPopoverController/WYPopoverController.m +++ b/WYPopoverController/WYPopoverController.m @@ -90,9 +90,11 @@ - (void)setEmbedInPopover:(BOOL)value - (void)sizzled_pushViewController:(UIViewController *)viewController animated:(BOOL)animated { - if (self.isEmbedInPopover && WY_IS_IOS_GREATER_THAN_OR_EQUAL_TO(@"7.0")) + if (self.isEmbedInPopover) { +#ifdef WY_BASE_SDK_7_ENABLED viewController.edgesForExtendedLayout = UIRectEdgeNone; +#endif } [self sizzled_pushViewController:viewController animated:animated]; @@ -1598,9 +1600,11 @@ - (void)setPopoverNavigationBarBackgroundImage UINavigationController *navigationController = (UINavigationController *)viewController; navigationController.embedInPopover = YES; - if (WY_IS_IOS_GREATER_THAN_OR_EQUAL_TO(@"7.0") && [navigationController viewControllers] && [[navigationController viewControllers] count] > 0) + if ([navigationController viewControllers] && [[navigationController viewControllers] count] > 0) { +#ifdef WY_BASE_SDK_7_ENABLED [(UIViewController *)[[navigationController viewControllers] objectAtIndex:0] setEdgesForExtendedLayout:UIRectEdgeNone]; +#endif } [navigationController.navigationBar setBackgroundImage:[UIImage imageWithColor:[UIColor clearColor]] forBarMetrics:UIBarMetricsDefault];