[ios] Format all Obj C code via clang-format

Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
This commit is contained in:
Konstantin Pastbin
2025-08-17 16:37:15 +07:00
parent 52e9ddc038
commit aea784ddd7
109 changed files with 5113 additions and 4270 deletions

View File

@@ -2,22 +2,20 @@
#import "MWMZoomButtonsView.h"
#import "Statistics.h"
#include "Framework.h"
#include "platform/settings.hpp"
#include "indexer/scales.hpp"
#include "platform/settings.hpp"
static NSString * const kMWMZoomButtonsViewNibName = @"MWMZoomButtonsView";
@interface MWMZoomButtons ()
@interface MWMZoomButtons()
@property(nonatomic) IBOutlet MWMZoomButtonsView * zoomView;
@property(weak, nonatomic) IBOutlet UIButton * zoomInButton;
@property(weak, nonatomic) IBOutlet UIButton * zoomOutButton;
@property (nonatomic) IBOutlet MWMZoomButtonsView * zoomView;
@property (weak, nonatomic) IBOutlet UIButton * zoomInButton;
@property (weak, nonatomic) IBOutlet UIButton * zoomOutButton;
@property (nonatomic) BOOL zoomSwipeEnabled;
@property (nonatomic, readonly) BOOL isZoomEnabled;
@property(nonatomic) BOOL zoomSwipeEnabled;
@property(nonatomic, readonly) BOOL isZoomEnabled;
@end

View File

@@ -1,5 +1,5 @@
#import "Common.h"
#import "MWMZoomButtonsView.h"
#import "Common.h"
#import "MWMMapViewControlsCommon.h"
static CGFloat const kZoomViewOffsetToTopBound = 12.0;
@@ -7,9 +7,9 @@ static CGFloat const kZoomViewOffsetToBottomBound = 40.0;
static CGFloat const kZoomViewOffsetToFrameBound = 294.0;
static CGFloat const kZoomViewHideBoundPercent = 0.4;
@interface MWMZoomButtonsView()
@interface MWMZoomButtonsView ()
@property (nonatomic) CGRect defaultBounds;
@property(nonatomic) CGRect defaultBounds;
@end
@@ -39,7 +39,8 @@ static CGFloat const kZoomViewHideBoundPercent = 0.4;
- (void)layoutYPosition
{
CGFloat const maxY = MIN(self.superview.height - kZoomViewOffsetToFrameBound, self.bottomBound - kZoomViewOffsetToBottomBound);
CGFloat const maxY =
MIN(self.superview.height - kZoomViewOffsetToFrameBound, self.bottomBound - kZoomViewOffsetToBottomBound);
self.minY = MAX(maxY - self.height, self.topBound + kZoomViewOffsetToTopBound);
}
@@ -59,7 +60,8 @@ static CGFloat const kZoomViewHideBoundPercent = 0.4;
{
CGFloat const hideBound = kZoomViewHideBoundPercent * self.superview.height;
BOOL const isHidden = self.alpha == 0.0;
BOOL const willHide = (self.bottomBound < hideBound) || (self.defaultBounds.size.height > self.bottomBound - self.topBound);
BOOL const willHide =
(self.bottomBound < hideBound) || (self.defaultBounds.size.height > self.bottomBound - self.topBound);
if (willHide)
{
if (!isHidden)
@@ -84,15 +86,12 @@ static CGFloat const kZoomViewHideBoundPercent = 0.4;
if (!hidden)
self.hidden = NO;
[self layoutXPosition:!hidden];
[UIView animateWithDuration:framesDuration(kMenuViewHideFramesCount) animations:^
{
[self layoutXPosition:hidden];
}
completion:^(BOOL finished)
{
if (hidden)
self.hidden = YES;
}];
[UIView animateWithDuration:framesDuration(kMenuViewHideFramesCount)
animations:^{ [self layoutXPosition:hidden]; }
completion:^(BOOL finished) {
if (hidden)
self.hidden = YES;
}];
}
else
{