forked from organicmaps/organicmaps
[search] Clang-format.
This commit is contained in:
parent
edd60b96cf
commit
2d53ece56a
12 changed files with 29 additions and 26 deletions
|
@ -133,10 +133,12 @@
|
|||
- (void)viewWillTransitionToSize:(CGSize)size
|
||||
withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator
|
||||
{
|
||||
[coordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext> context) {
|
||||
NSArray<NSIndexPath *> * ips = self.tableView.indexPathsForVisibleRows;
|
||||
[self.tableView reloadRowsAtIndexPaths:ips withRowAnimation:UITableViewRowAnimationFade];
|
||||
} completion:nil];
|
||||
[coordinator
|
||||
animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext> context) {
|
||||
NSArray<NSIndexPath *> * ips = self.tableView.indexPathsForVisibleRows;
|
||||
[self.tableView reloadRowsAtIndexPaths:ips withRowAnimation:UITableViewRowAnimationFade];
|
||||
}
|
||||
completion:nil];
|
||||
}
|
||||
|
||||
- (NSString *)truncateString:(NSString *)string toWidth:(CGFloat)width withFont:(UIFont *)font
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
{
|
||||
self.text = L(localizedText);
|
||||
}
|
||||
|
||||
- (NSString *)localizedText
|
||||
{
|
||||
NSString * text = self.text;
|
||||
|
|
|
@ -173,7 +173,8 @@ CGFloat angleWithProgress(CGFloat progress) { return 2.0 * M_PI * progress - M_P
|
|||
: @"light";
|
||||
for (NSUInteger i = 0; i < animationImagesCount; ++i)
|
||||
{
|
||||
UIImage * image = [UIImage imageNamed:[NSString stringWithFormat:@"Spinner_%@_%@", @(i + 1), postfix]];
|
||||
UIImage * image =
|
||||
[UIImage imageNamed:[NSString stringWithFormat:@"Spinner_%@_%@", @(i + 1), postfix]];
|
||||
animationImages[i] = image;
|
||||
}
|
||||
self.spinner.animationDuration = 0.8;
|
||||
|
|
|
@ -532,8 +532,9 @@ CGFloat constexpr kTimeWidthRegular = 128;
|
|||
NSMutableArray * morphImages = [NSMutableArray arrayWithCapacity:morphImagesCount];
|
||||
for (NSUInteger i = startValue, j = 0; i != endValue; i += stepValue, j++)
|
||||
{
|
||||
UIImage * image = [UIImage imageNamed:[NSString stringWithFormat:@"%@%@_%@", morphTemplate, @(i).stringValue,
|
||||
[UIColor isNightMode] ? @"dark" : @"light"]];
|
||||
UIImage * image =
|
||||
[UIImage imageNamed:[NSString stringWithFormat:@"%@%@_%@", morphTemplate, @(i).stringValue,
|
||||
[UIColor isNightMode] ? @"dark" : @"light"]];
|
||||
morphImages[j] = image;
|
||||
}
|
||||
btn.imageView.animationImages = morphImages;
|
||||
|
|
|
@ -961,8 +961,7 @@ void registerCellsForTableView(vector<MWMPlacePageCellType> const & cells, UITab
|
|||
CLLocation * location = [[CLLocation alloc] initWithLatitude:latLon.lat longitude:latLon.lon];
|
||||
self.isFeatureUploaded = osm::Editor::Instance().IsFeatureUploaded(fid.m_mwmId, fid.m_index);
|
||||
NSIndexPath * ip = [self.tableView indexPathForCell:cell];
|
||||
[self.tableView reloadRowsAtIndexPaths:@[ip]
|
||||
withRowAnimation:UITableViewRowAnimationFade];
|
||||
[self.tableView reloadRowsAtIndexPaths:@[ ip ] withRowAnimation:UITableViewRowAnimationFade];
|
||||
|
||||
auto placeDoesntExistAction = ^{
|
||||
[self.alertController presentPlaceDoesntExistAlertWithBlock:^(NSString * additionalMessage) {
|
||||
|
|
|
@ -141,7 +141,8 @@ extern NSDictionary * const kMWMOpeningHoursEditorTableCells = @{
|
|||
- (UITableViewCell * _Nonnull)tableView:(UITableView * _Nonnull)tableView
|
||||
cellForRowAtIndexPath:(NSIndexPath * _Nonnull)indexPath
|
||||
{
|
||||
UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:[self cellIdentifierForIndexPath:indexPath]];
|
||||
UITableViewCell * cell =
|
||||
[tableView dequeueReusableCellWithIdentifier:[self cellIdentifierForIndexPath:indexPath]];
|
||||
return cell;
|
||||
}
|
||||
|
||||
|
|
|
@ -150,10 +150,10 @@ void initFieldsMap()
|
|||
NSNumberFormatter * decimalFormatter = [[NSNumberFormatter alloc] init];
|
||||
decimalFormatter.numberStyle = NSNumberFormatterDecimalStyle;
|
||||
NSNumber * currencyNumber = [decimalFormatter
|
||||
numberFromString:
|
||||
[@(minPrice.c_str())
|
||||
stringByReplacingOccurrencesOfString:@"."
|
||||
withString:decimalFormatter.decimalSeparator]];
|
||||
numberFromString:[@(minPrice.c_str())
|
||||
stringByReplacingOccurrencesOfString:@"."
|
||||
withString:decimalFormatter
|
||||
.decimalSeparator]];
|
||||
NSString * currencyString = [currencyFormatter stringFromNumber:currencyNumber];
|
||||
NSString * currencyPattern =
|
||||
[L(@"place_page_starting_from") stringByReplacingOccurrencesOfString:@"%s"
|
||||
|
|
|
@ -279,10 +279,10 @@ using namespace place_page;
|
|||
decimalFormatter.numberStyle = NSNumberFormatterDecimalStyle;
|
||||
|
||||
NSNumber * currencyNumber = [decimalFormatter
|
||||
numberFromString:[@(minPrice.c_str())
|
||||
stringByReplacingOccurrencesOfString:@"."
|
||||
withString:decimalFormatter
|
||||
.decimalSeparator]];
|
||||
numberFromString:[@(minPrice.c_str())
|
||||
stringByReplacingOccurrencesOfString:@"."
|
||||
withString:decimalFormatter
|
||||
.decimalSeparator]];
|
||||
NSString * currencyString = [currencyFormatter stringFromNumber:currencyNumber];
|
||||
|
||||
NSString * pattern =
|
||||
|
|
|
@ -163,7 +163,7 @@ NSString * titleForButton(EButton type, BOOL isSelected)
|
|||
NSMutableArray * animationImages = [NSMutableArray arrayWithCapacity:animationImagesCount];
|
||||
for (NSUInteger i = 0; i < animationImagesCount; ++i)
|
||||
{
|
||||
UIImage * image = [UIImage imageNamed:[NSString stringWithFormat:@"ic_bookmarks_%@", @(i+1)]];
|
||||
UIImage * image = [UIImage imageNamed:[NSString stringWithFormat:@"ic_bookmarks_%@", @(i + 1)]];
|
||||
animationImages[i] = image;
|
||||
}
|
||||
UIImageView * animationIV = btn.imageView;
|
||||
|
|
|
@ -180,7 +180,8 @@ NSString * const kTextViewContentSizeKeyPath = @"contentSize";
|
|||
NSString * postfix = [UIColor isNightMode] ? @"dark" : @"light";
|
||||
for (NSUInteger i = 0; i < animationImagesCount; ++i)
|
||||
{
|
||||
UIImage * image = [UIImage imageNamed:[NSString stringWithFormat:@"Spinner_%@_%@", @(i + 1), postfix]];
|
||||
UIImage * image =
|
||||
[UIImage imageNamed:[NSString stringWithFormat:@"Spinner_%@_%@", @(i + 1), postfix]];
|
||||
animationImages[i] = image;
|
||||
}
|
||||
self.spinner.animationDuration = 0.8;
|
||||
|
|
|
@ -167,8 +167,7 @@
|
|||
UIView * targetView =
|
||||
[self.textContainer isKindOfClass:[UITextView class]] ? sender.view : self.textContainer;
|
||||
UIView * superview = sender.view.superview;
|
||||
[menuController setTargetRect:CGRectMake(tapPoint.x, targetView.minY, 0., 0.)
|
||||
inView:superview];
|
||||
[menuController setTargetRect:CGRectMake(tapPoint.x, targetView.minY, 0., 0.) inView:superview];
|
||||
[menuController setMenuVisible:YES animated:YES];
|
||||
[targetView becomeFirstResponder];
|
||||
[menuController update];
|
||||
|
|
|
@ -102,9 +102,9 @@ static NSString * const kMyPositionCellIdentifier = @"MWMSearchHistoryMyPosition
|
|||
[tCell config:[self stringAtIndex:indexPath.row]];
|
||||
return tCell;
|
||||
}
|
||||
UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:self.isRouteSearchMode
|
||||
? kMyPositionCellIdentifier
|
||||
: kClearCellIdentifier];
|
||||
UITableViewCell * cell = [tableView
|
||||
dequeueReusableCellWithIdentifier:self.isRouteSearchMode ? kMyPositionCellIdentifier
|
||||
: kClearCellIdentifier];
|
||||
return cell;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue