diff --git a/ICViewPager/ICViewPager/ViewPagerController.m b/ICViewPager/ICViewPager/ViewPagerController.m index 4281853..5c13a80 100644 --- a/ICViewPager/ICViewPager/ViewPagerController.m +++ b/ICViewPager/ICViewPager/ViewPagerController.m @@ -204,9 +204,11 @@ - (void)layoutSubviews { CGFloat topLayoutGuide = 0.0; if (IOS_VERSION_7) { - topLayoutGuide = 20.0; - if (self.navigationController && !self.navigationController.navigationBarHidden) { - topLayoutGuide += self.navigationController.navigationBar.frame.size.height; + if (self.navigationController.navigationBar.isTranslucent) { + topLayoutGuide = 20.0; + if (self.navigationController && !self.navigationController.navigationBarHidden) { + topLayoutGuide += self.navigationController.navigationBar.frame.size.height; + } } }