[ios] Fixed bug with fullscreen compass.

This commit is contained in:
v.mikhaylenko 2015-09-16 12:17:36 +03:00 committed by Alex Zolotarev
parent acc6b874dc
commit cac7a9e571

View file

@ -38,12 +38,13 @@ static CGFloat const kDirectionArrowSide = IPAD ? 260. : 160.;
- (void)layoutSubviews
{
self.frame = self.superview.bounds;
UIView * superview = self.superview;
self.frame = superview.bounds;
CGSize const size = self.superview.size;
self.size = size;
CGFloat const minimumBorderOffset = 40.;
BOOL const isLandscape = size.width > size.height;
[superview bringSubviewToFront:self];
if (isLandscape)
{
CGFloat const defaultWidth = size.width - 3. * minimumBorderOffset - kDirectionArrowSide;