[ios] Fixed side buttons location for right-to-left languages. (#4598)

This commit is contained in:
Илья Гречухин 2016-10-31 12:47:03 +03:00 committed by Vlad Mihaylenko
parent 89a082e0e5
commit 6348e02a11

View file

@ -55,10 +55,20 @@ CGFloat constexpr kZoomOutToLayoutPortraitOffset = 52;
- (void)layoutXPosition:(BOOL)hidden
{
if (hidden)
self.minX = self.superview.width;
if ([UIApplication sharedApplication].userInterfaceLayoutDirection == UIUserInterfaceLayoutDirectionRightToLeft)
{
if (hidden)
self.maxX = 0;
else
self.minX = kViewControlsOffsetToBounds;
}
else
self.maxX = self.superview.width - kViewControlsOffsetToBounds;
{
if (hidden)
self.minX = self.superview.width;
else
self.maxX = self.superview.width - kViewControlsOffsetToBounds;
}
}
- (void)layoutYPosition { self.maxY = self.bottomBound; }