forked from organicmaps/organicmaps
[ios] Fixed side buttons location for right-to-left languages. (#4598)
This commit is contained in:
parent
89a082e0e5
commit
6348e02a11
1 changed files with 13 additions and 3 deletions
|
@ -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; }
|
||||
|
|
Loading…
Add table
Reference in a new issue