From fd8d51aff2c486b0f1fe15f9d7f996a7964dccb2 Mon Sep 17 00:00:00 2001 From: Gribok <50gramm@mail.ru> Date: Fri, 4 Jul 2014 14:50:55 +0400 Subject: [PATCH] Update TSPopoverController.m --- TSPopover/TSPopoverController.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/TSPopover/TSPopoverController.m b/TSPopover/TSPopoverController.m index fb2fc74..41b6e59 100644 --- a/TSPopover/TSPopoverController.m +++ b/TSPopover/TSPopoverController.m @@ -251,7 +251,9 @@ - (CGRect) contentFrameRect:(CGRect)contentFrame senderPoint:(CGPoint)senderPoin contentFrameRect.origin.x = MARGIN; contentFrameRect.origin.y = MARGIN; - float statusBarHeight = [[UIApplication sharedApplication] statusBarFrame].size.height; + float statusBarHeight = screenWidth > screenHeight ? + [[UIApplication sharedApplication] statusBarFrame].size.width : + [[UIApplication sharedApplication] statusBarFrame].size.height; if(self.arrowPosition == TSPopoverArrowPositionVertical){