Merge pull request #4491 from igrechuhin/ios7

[ios] Removed iOS 7 support.
This commit is contained in:
Vlad Mihaylenko 2016-10-13 16:25:05 +04:00 committed by GitHub
commit a8067e8826
40 changed files with 110 additions and 651 deletions

View file

@ -95,8 +95,6 @@
[Statistics logEvent:kStatEventName(kStatBookmarks, kStatToggleVisibility)
withParameters:@{kStatValue : visible ? kStatVisible : kStatHidden}];
cell.imageView.image = [UIImage imageNamed:(visible ? @"ic_show" : @"ic_hide")];
if (isIOS7)
[cell.imageView makeImageAlwaysTemplate];
cell.imageView.mwm_coloring = visible ? MWMImageColoringBlue : MWMImageColoringBlack;
{
BookmarkCategory::Guard guard(*cat);
@ -130,8 +128,6 @@
BOOL const isVisible = cat->IsVisible();
cell.imageView.image = [UIImage imageNamed:(isVisible ? @"ic_show" : @"ic_hide")];
cell.imageView.mwm_coloring = isVisible ? MWMImageColoringBlue : MWMImageColoringBlack;
if (isIOS7)
[cell.imageView makeImageAlwaysTemplate];
cell.detailTextLabel.text = [NSString stringWithFormat:@"%ld", cat->GetUserMarkCount() + cat->GetTracksCount()];
}
cell.backgroundColor = [UIColor white];

View file

@ -5,21 +5,12 @@
+ (NSString *)estimatedArrivalTimeWithSeconds:(NSTimeInterval)seconds
{
if (isIOS7)
{
NSInteger const minutes = seconds / 60;
NSInteger const hours = minutes / 60;
return [NSString stringWithFormat:@"%ld:%02ld", (long)hours, (long)(minutes % 60)];
}
else
{
NSDateComponentsFormatter * formatter = [[NSDateComponentsFormatter alloc] init];
formatter.allowedUnits = NSCalendarUnitMinute | NSCalendarUnitHour | NSCalendarUnitDay;
formatter.maximumUnitCount = 2;
formatter.unitsStyle = NSDateComponentsFormatterUnitsStyleAbbreviated;
formatter.zeroFormattingBehavior = NSDateComponentsFormatterZeroFormattingBehaviorDropAll;
return [formatter stringFromTimeInterval:seconds];
}
NSDateComponentsFormatter * formatter = [[NSDateComponentsFormatter alloc] init];
formatter.allowedUnits = NSCalendarUnitMinute | NSCalendarUnitHour | NSCalendarUnitDay;
formatter.maximumUnitCount = 2;
formatter.unitsStyle = NSDateComponentsFormatterUnitsStyleAbbreviated;
formatter.zeroFormattingBehavior = NSDateComponentsFormatterZeroFormattingBehaviorDropAll;
return [formatter stringFromTimeInterval:seconds];
}
@end

View file

@ -60,12 +60,6 @@ static inline CGFloat LengthCGPoint(CGPoint point)
@end
@interface UIImageView (IOS7Workaround)
- (void)makeImageAlwaysTemplate;
@end
@interface UIApplication (URLs)
- (void)rateVersionFrom:(NSString *)launchPlaceName;

View file

@ -105,12 +105,9 @@
- (void)rateVersionFrom:(NSString *)launchPlaceName
{
NSString * urlString =
isIOS7 ? [NSString stringWithFormat:
@"itms-apps://itunes.apple.com/app/id510623322?mt=8&at=1l3v7ya&ct=%@",
launchPlaceName]
: @"itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/"
@"viewContentsUserReviews?id=510623322&onlyLatestVersion=true&pageNumber=0&"
@"sortOrdering=1&type=Purple+Software";
@"itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/"
@"viewContentsUserReviews?id=510623322&onlyLatestVersion=true&pageNumber=0&"
@"sortOrdering=1&type=Purple+Software";
[self openURL:[NSURL URLWithString:urlString]];
}
@ -271,16 +268,6 @@
@end
@implementation UIImageView (IOS7Workaround)
- (void)makeImageAlwaysTemplate
{
if (isIOS7)
self.image = [self.image imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
}
@end
@implementation SolidTouchImageView
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {}
@ -320,7 +307,7 @@
NSString * scheme = url.scheme;
NSAssert(([scheme isEqualToString:@"http"] || [scheme isEqualToString:@"https"]), @"Incorrect
url's scheme!");
if ((isIOS7 || isIOS8))
if (isIOS8)
{
UIApplication * app = [UIApplication sharedApplication];
if ([app canOpenURL:url])

View file

@ -26,8 +26,6 @@ namespace
- (void)setColoring:(MWMButtonColoring)coloring
{
_coloring = coloring;
if (isIOS7)
[self.imageView makeImageAlwaysTemplate];
[self setDefaultTintColor];
}
@ -61,8 +59,6 @@ namespace
- (void)setHighlighted:(BOOL)highlighted
{
[super setHighlighted:highlighted];
if (isIOS7)
[self.imageView makeImageAlwaysTemplate];
if (highlighted)
{
switch (self.coloring)
@ -96,8 +92,6 @@ namespace
- (void)setSelected:(BOOL)selected
{
[super setSelected:selected];
if (isIOS7)
[self.imageView makeImageAlwaysTemplate];
if (selected)
{
switch (self.coloring)

View file

@ -208,17 +208,13 @@ static NSString * const kAlertControllerNibIdentifier = @"MWMAlertViewController
[self.ownerViewController addChildViewController:self];
self.view.alpha = 0.;
alert.alpha = 0.;
if (!isIOS7)
{
CGFloat const scale = 1.1;
alert.transform = CGAffineTransformMakeScale(scale, scale);
}
CGFloat const scale = 1.1;
alert.transform = CGAffineTransformMakeScale(scale, scale);
[UIView animateWithDuration:kDefaultAnimationDuration
animations:^{
self.view.alpha = 1.;
alert.alpha = 1.;
if (!isIOS7)
alert.transform = CGAffineTransformIdentity;
alert.transform = CGAffineTransformIdentity;
}];
[MapsAppDelegate.theApp.window endEditing:YES];
}

View file

@ -177,13 +177,6 @@
- (void)rotate:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{
if (isIOS7 && [self respondsToSelector:@selector(setTransform:)])
{
[UIView animateWithDuration:duration
animations:^{
self.transform = rotation(toInterfaceOrientation);
}];
}
if ([self respondsToSelector:@selector(willRotateToInterfaceOrientation:)])
[self willRotateToInterfaceOrientation:toInterfaceOrientation];
}

View file

@ -19,16 +19,13 @@ static NSString * const kStatisticsEvent = @"Location Alert";
[Statistics logEvent:kStatisticsEvent withParameters:@{kStatAction : kStatOpen}];
MWMLocationAlert * alert = [[[NSBundle mainBundle] loadNibNamed:kLocationAlertNibName owner:nil options:nil] firstObject];
[alert setNeedsCloseAlertAfterEnterBackground];
if (isIOS7)
[alert.rightButton setTitle:L(@"ok") forState:UIControlStateNormal];
return alert;
}
- (IBAction)settingsTap
{
[Statistics logEvent:kStatisticsEvent withParameters:@{kStatAction : kStatApply}];
if (!isIOS7)
[self openSettings];
[self openSettings];
[self close];
}

View file

@ -41,12 +41,7 @@ static NSString * const kStatisticsEvent = @"Routing Disclaimer Alert";
}];
[alert.textView sizeToFit];
UIWindow * window = UIApplication.sharedApplication.keyWindow;
CGFloat height;
if (isIOS7)
height = UIInterfaceOrientationIsLandscape(orientation) ? window.width : window.height;
else
height = window.height;
[alert invalidateTextViewHeight:alert.textView.height withHeight:height];
[alert invalidateTextViewHeight:alert.textView.height withHeight:window.height];
alert.okBlock = block;
return alert;
}
@ -83,7 +78,7 @@ static NSString * const kStatisticsEvent = @"Routing Disclaimer Alert";
- (CGFloat)bounded:(CGFloat)f withHeight:(CGFloat)h
{
CGFloat const currentHeight = [self.subviews.firstObject height];
CGFloat const maximumHeight = h - (isIOS7 ? 4. : 2.) * kMinimumOffset;
CGFloat const maximumHeight = h - 2. * kMinimumOffset;
CGFloat const availableHeight = maximumHeight - currentHeight;
return MIN(f, availableHeight + self.textViewHeight.constant);
}

View file

@ -30,7 +30,7 @@ NSString * const kRefresh = L(@"refresh");
using namespace osm;
using namespace osm_auth_ios;
@interface MWMAuthorizationLoginViewController () <UIActionSheetDelegate>
@interface MWMAuthorizationLoginViewController ()
@property (weak, nonatomic) IBOutlet UIView * authView;
@property (weak, nonatomic) IBOutlet UIView * accountView;
@ -217,41 +217,30 @@ using namespace osm_auth_ios;
- (void)showActionSheet
{
if (isIOS7)
UIAlertController * alertController =
[UIAlertController alertControllerWithTitle:nil
message:nil
preferredStyle:UIAlertControllerStyleActionSheet];
[alertController addAction:[UIAlertAction actionWithTitle:kRefresh
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
[self refresh:YES];
}]];
[alertController addAction:[UIAlertAction actionWithTitle:kLogout
style:UIAlertActionStyleDestructive
handler:^(UIAlertAction * action) {
[self logout];
}]];
[alertController
addAction:[UIAlertAction actionWithTitle:kCancel style:UIAlertActionStyleCancel handler:nil]];
if (IPAD)
{
UIActionSheet * actionSheet = [[UIActionSheet alloc] initWithTitle:nil delegate:self cancelButtonTitle:kCancel destructiveButtonTitle:kLogout otherButtonTitles:kRefresh, nil];
[actionSheet showInView:self.view];
UIPopoverPresentationController * popPresenter =
[alertController popoverPresentationController];
popPresenter.barButtonItem = self.navigationItem.rightBarButtonItem;
}
else
{
UIAlertController * alertController = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleActionSheet];
[alertController addAction:[UIAlertAction actionWithTitle:kRefresh style:UIAlertActionStyleDefault handler:^(UIAlertAction * action)
{
[self refresh:YES];
}]];
[alertController addAction:[UIAlertAction actionWithTitle:kLogout style:UIAlertActionStyleDestructive handler:^(UIAlertAction * action)
{
[self logout];
}]];
[alertController addAction:[UIAlertAction actionWithTitle:kCancel style:UIAlertActionStyleCancel handler:nil]];
if (IPAD)
{
UIPopoverPresentationController * popPresenter = [alertController popoverPresentationController];
popPresenter.barButtonItem = self.navigationItem.rightBarButtonItem;
}
[self presentViewController:alertController animated:YES completion:nil];
}
}
#pragma mark - UIActionSheetDelegate
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
{
if (actionSheet.destructiveButtonIndex == buttonIndex)
[self logout];
else if ([[actionSheet buttonTitleAtIndex:buttonIndex] isEqualToString:kRefresh])
[self refresh:YES];
[self presentViewController:alertController animated:YES completion:nil];
}
#pragma mark - Segue

View file

@ -15,18 +15,9 @@ namespace
{
NSString * const kVerifierKey = @"oauth_verifier";
BOOL checkURLHasVerifierKey(NSString * urlString)
{
return isIOS7 ? [urlString rangeOfString:kVerifierKey].location != NSNotFound
: [urlString containsString:kVerifierKey];
}
BOOL checkURLNeedsReload(NSString * urlString)
{
BOOL const hasSlashSuffix = [urlString hasSuffix:@"/"];
if (!isIOS7)
return hasSlashSuffix || [urlString containsString:@"/welcome"];
return hasSlashSuffix || ([urlString rangeOfString:@"/welcome"].location != NSNotFound);
return [urlString hasSuffix:@"/"] || [urlString containsString:@"/welcome"];
}
NSString * getVerifier(NSString * urlString)
@ -203,7 +194,7 @@ NSString * getVerifier(NSString * urlString)
{
[self loadAuthorizationPage];
}
else if (checkURLHasVerifierKey(urlString))
else if ([urlString containsString:kVerifierKey])
{
webView.hidden = YES;
NSString * verifier = getVerifier(urlString);

View file

@ -68,7 +68,7 @@ static NSString * const kKeyPath = @"subviews";
- (BOOL)isVisible
{
if (isIOS7 || isIOS8)
if (isIOS8)
return _isVisible;
return NO;
}
@ -77,7 +77,7 @@ static NSString * const kKeyPath = @"subviews";
{
// Status bar in iOS 9 already provides back button if the app has been launched from another app.
// For iOS version less than 9 we just try to mimic the default iOS 9 status bar.
if (!(isIOS7 || isIOS8))
if (!isIOS8)
return;
if (_isVisible == isVisible)
return;

View file

@ -24,8 +24,6 @@
isEnabled:(BOOL)isEnabled
{
self.icon.image = [UIImage imageNamed:imageName];
if (isIOS7)
[self.icon makeImageAlwaysTemplate];
self.label.text = label;
if (badgeCount > 0)
{

View file

@ -509,8 +509,6 @@ CGFloat constexpr kTimeWidthRegular = 128;
case MWMBottomMenuStateCompact: name = @"ic_menu_left"; break;
}
UIImage * image = [UIImage imageNamed:name];
if (isIOS7)
image = [image imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
[btn setImage:image forState:UIControlStateNormal];
if (self.state == MWMBottomMenuStateInactive)
{
@ -531,7 +529,6 @@ CGFloat constexpr kTimeWidthRegular = 128;
- (void)refreshOnOrientationChange
{
[self refreshButtonsColor];
if (IPAD || self.state != MWMBottomMenuStateCompact)
return;
BOOL const isPortrait = self.superview.width < self.superview.height;
@ -543,21 +540,10 @@ CGFloat constexpr kTimeWidthRegular = 128;
{
self.layoutDuration = kDefaultAnimationDuration;
[self setNeedsLayout];
[self refreshButtonsColor];
if (self.state == MWMBottomMenuStateInactive)
[self updateBadge];
}
- (void)refreshButtonsColor
{
if (!isIOS7)
return;
auto const coloring = self.p2pButton.coloring;
self.p2pButton.coloring = coloring;
self.bookmarksButton.coloring = coloring;
self.searchButton.coloring = self.searchButton.coloring;
}
- (void)updateBadge
{
if (self.state == MWMBottomMenuStateRouting || self.state == MWMBottomMenuStateRoutingExpanded ||

View file

@ -92,8 +92,6 @@ static CGFloat const kIconToLabelSpacing = 4.0;
{
_iconImage = iconImage;
[self.icon setImage:iconImage forState:UIControlStateNormal];
if (isIOS7)
[self.icon.imageView makeImageAlwaysTemplate];
}
- (void)setLocalizedText:(NSString *)localizedText

View file

@ -44,17 +44,6 @@
self.titleLabel.text = @(cat->GetName().c_str());
}
- (void)layoutSubviews
{
[super layoutSubviews];
if (isIOS7)
{
self.titleLabel.preferredMaxLayoutWidth = floor(self.titleLabel.width);
self.countLabel.preferredMaxLayoutWidth = floor(self.countLabel.width);
[super layoutSubviews];
}
}
- (IBAction)toggleVisibility
{
self.isVisible = !self.isVisible;

View file

@ -23,16 +23,6 @@
sl.rasterizationScale = UIScreen.mainScreen.scale;
}
- (void)layoutSubviews
{
[super layoutSubviews];
if (isIOS7)
{
self.label.preferredMaxLayoutWidth = floor(self.label.width);
[super layoutSubviews];
}
}
- (void)setCategory:(NSString *)category
{
self.label.text = L(category);

View file

@ -25,18 +25,6 @@
{
self.title.text = title;
[self.title sizeToFit];
if (isIOS7)
[self layoutIfNeeded];
}
- (void)layoutSubviews
{
[super layoutSubviews];
if (isIOS7)
{
self.title.preferredMaxLayoutWidth = floor(self.title.width);
[super layoutSubviews];
}
}
+ (CGFloat)defaultCellHeight

View file

@ -64,16 +64,6 @@
[self.titleLabel sizeToFit];
}
- (void)layoutSubviews
{
[super layoutSubviews];
if (isIOS7)
{
self.titleLabel.preferredMaxLayoutWidth = floor(self.titleLabel.width);
[super layoutSubviews];
}
}
- (NSDictionary *)selectedTitleAttributes
{
return nil;

View file

@ -72,21 +72,6 @@
self.distanceLabel.text = @(distanceStr.c_str());
}
}
if (isIOS7)
[self layoutIfNeeded];
}
- (void)layoutSubviews
{
[super layoutSubviews];
if (isIOS7)
{
self.typeLabel.preferredMaxLayoutWidth = floor(self.typeLabel.width);
self.infoLabel.preferredMaxLayoutWidth = floor(self.infoLabel.width);
self.locationLabel.preferredMaxLayoutWidth = floor(self.locationLabel.width);
self.distanceLabel.preferredMaxLayoutWidth = floor(self.distanceLabel.width);
[super layoutSubviews];
}
}
- (void)setInfoText:(NSString *)infoText

View file

@ -185,8 +185,6 @@ BOOL defaultOrientation(CGSize const & size)
{
self.turnsView.hidden = NO;
self.nextTurnImageView.image = info.turnImage;
if (isIOS7)
[self.nextTurnImageView makeImageAlwaysTemplate];
self.nextTurnImageView.mwm_coloring = MWMImageColoringWhite;
if (info.roundExitNumber == 0)
@ -221,8 +219,6 @@ BOOL defaultOrientation(CGSize const & size)
{
self.secondTurnView.hidden = NO;
self.secondTurnImageView.image = info.nextTurnImage;
if (isIOS7)
[self.secondTurnImageView makeImageAlwaysTemplate];
self.secondTurnImageView.mwm_coloring = MWMImageColoringBlack;
}
else

View file

@ -190,7 +190,7 @@ vector<pair<string, string>> availableLanguages()
AVSpeechSynthesisVoice * voice = nil;
for (NSString * loc in candidateLocales)
{
if (!(isIOS7 || isIOS8) && [loc isEqualToString:@"en-US"])
if (!isIOS8 && [loc isEqualToString:@"en-US"])
voice = [AVSpeechSynthesisVoice voiceWithLanguage:AVSpeechSynthesisVoiceIdentifierAlex];
if (voice)
break;

View file

@ -22,17 +22,6 @@
namespace
{
// Returns native scale if it's possible.
double correctContentScale()
{
UIScreen * uiScreen = [UIScreen mainScreen];
if (isIOS7)
return [uiScreen respondsToSelector:@selector(scale)] ? [uiScreen scale] : 1.f;
else
return [uiScreen respondsToSelector:@selector(nativeScale)] ? [uiScreen nativeScale] : 1.f;
}
// Returns DPI as exact as possible. It works for iPhone, iPad and iWatch.
double getExactDPI(double contentScaleFactor)
{
@ -82,7 +71,7 @@ double getExactDPI(double contentScaleFactor)
kEAGLDrawablePropertyColorFormat : kEAGLColorFormatRGBA8};
// Correct retina display support in opengl renderbuffer
self.contentScaleFactor = correctContentScale();
self.contentScaleFactor = [[UIScreen mainScreen] nativeScale];
m_factory = make_unique_dp<dp::ThreadSafeFactory>(new iosOGLContextFactory(eaglLayer));
}

View file

@ -19,7 +19,7 @@ NSString * const kPlacePageActionBarNibName = @"PlacePageActionBar";
} // namespace
@interface MWMPlacePageActionBar ()<MWMActionBarButtonDelegate, UIActionSheetDelegate>
@interface MWMPlacePageActionBar ()<MWMActionBarButtonDelegate>
{
vector<EButton> m_visibleButtons;
vector<EButton> m_additionalButtons;
@ -212,61 +212,33 @@ NSString * const kPlacePageActionBarNibName = @"PlacePageActionBar";
NSAssert(false, @"Title can't be nil!");
}
if (isIOS7)
UIAlertController * alertController =
[UIAlertController alertControllerWithTitle:title
message:subtitle
preferredStyle:UIAlertControllerStyleActionSheet];
UIAlertAction * cancelAction =
[UIAlertAction actionWithTitle:cancel style:UIAlertActionStyleCancel handler:nil];
for (auto i = 0; i < titles.count; i++)
{
UIActionSheet * actionSheet = [[UIActionSheet alloc] initWithTitle:title
delegate:self
cancelButtonTitle:cancel
destructiveButtonTitle:nil
otherButtonTitles:nil];
for (NSString * title in titles)
[actionSheet addButtonWithTitle:title];
[actionSheet showInView:vc.view];
UIAlertAction * commonAction =
[UIAlertAction actionWithTitle:titles[i]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
[self tapOnButtonWithType:self->m_additionalButtons[i]];
}];
[alertController addAction:commonAction];
}
else
[alertController addAction:cancelAction];
if (IPAD)
{
UIAlertController * alertController =
[UIAlertController alertControllerWithTitle:title
message:subtitle
preferredStyle:UIAlertControllerStyleActionSheet];
UIAlertAction * cancelAction =
[UIAlertAction actionWithTitle:cancel style:UIAlertActionStyleCancel handler:nil];
for (auto i = 0; i < titles.count; i++)
{
UIAlertAction * commonAction =
[UIAlertAction actionWithTitle:titles[i]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
[self tapOnButtonWithType:self->m_additionalButtons[i]];
}];
[alertController addAction:commonAction];
}
[alertController addAction:cancelAction];
if (IPAD)
{
UIPopoverPresentationController * popPresenter =
[alertController popoverPresentationController];
popPresenter.sourceView = self.shareAnchor;
popPresenter.sourceRect = self.shareAnchor.bounds;
}
[vc presentViewController:alertController animated:YES completion:nil];
UIPopoverPresentationController * popPresenter =
[alertController popoverPresentationController];
popPresenter.sourceView = self.shareAnchor;
popPresenter.sourceRect = self.shareAnchor.bounds;
}
}
#pragma mark - UIActionSheetDelegate
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
{
[actionSheet dismissWithClickedButtonIndex:buttonIndex animated:YES];
// Using buttonIndex - 1 because there is cancel button at index 0
// Only iOS7
if (buttonIndex > 0)
[self tapOnButtonWithType:m_additionalButtons[buttonIndex - 1]];
[vc presentViewController:alertController animated:YES completion:nil];
}
#pragma mark - Layout

View file

@ -14,13 +14,7 @@ CGFloat const kTextViewLeft = 16.;
void performRenderingInConcurrentQueue(TMWMVoidBlock block)
{
if (!block)
return;
// We can't render html in the background queue in iOS7.
if (isIOS7)
block();
else
if (block)
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), block);
}
@ -189,9 +183,7 @@ void performRenderingInConcurrentQueue(TMWMVoidBlock block)
- (void)textViewScrollEnabled:(BOOL)isEnabled
{
// Here is hook for iOS7 because if we disable scrol in iOS7 content size will be incorrect.
if (!isIOS7)
self.textView.scrollEnabled = isEnabled;
self.textView.scrollEnabled = isEnabled;
}
- (IBAction)moreTap { [self.delegate moreTap]; }

View file

@ -12,17 +12,7 @@
{
UINavigationController * nc = self.sourceViewController.navigationController;
UIViewController * dvc = self.destinationViewController;
if (isIOS7)
{
if ([dvc isMemberOfClass:[UINavigationController class]])
[nc presentViewController:dvc animated:YES completion:nil];
else
[nc pushViewController:dvc animated:YES];
}
else
{
[nc showViewController:dvc sender:nil];
}
[nc showViewController:dvc sender:nil];
}
@end

View file

@ -14,16 +14,6 @@
return 62.0;
}
- (void)layoutSubviews
{
[super layoutSubviews];
if (isIOS7)
{
self.mapsCount.preferredMaxLayoutWidth = self.mapsCount.width;
[super layoutSubviews];
}
}
#pragma mark - Config
- (void)config:(storage::NodeAttrs const &)nodeAttrs

View file

@ -22,15 +22,6 @@
@implementation MWMMapDownloaderPlaceTableViewCell
+ (CGFloat)estimatedHeight { return 62.0; }
- (void)layoutSubviews
{
[super layoutSubviews];
if (isIOS7)
{
self.descriptionLabel.preferredMaxLayoutWidth = self.descriptionLabel.width;
[super layoutSubviews];
}
}
#pragma mark - Config

View file

@ -19,15 +19,6 @@
@implementation MWMMapDownloaderSubplaceTableViewCell
+ (CGFloat)estimatedHeight { return 82.0; }
- (void)layoutSubviews
{
[super layoutSubviews];
if (isIOS7)
{
self.subPlace.preferredMaxLayoutWidth = floor(self.subPlace.width);
[super layoutSubviews];
}
}
- (void)setSubplaceText:(NSString *)text
{

View file

@ -36,17 +36,6 @@
m_countryId = kInvalidCountryId;
}
- (void)layoutSubviews
{
[super layoutSubviews];
if (isIOS7)
{
self.title.preferredMaxLayoutWidth = floor(self.title.width);
self.downloadSize.preferredMaxLayoutWidth = floor(self.downloadSize.width);
[super layoutSubviews];
}
}
#pragma mark - Search matching
- (NSAttributedString *)matchedString:(NSString *)str

View file

@ -66,8 +66,8 @@ NSString * const kControllerIdentifier = @"MWMMapDownloaderViewController";
using namespace storage;
using namespace mwm;
@interface MWMBaseMapDownloaderViewController ()<UIActionSheetDelegate, UIScrollViewDelegate,
MWMFrameworkStorageObserver, MWMMyTargetDelegate>
@interface MWMBaseMapDownloaderViewController ()<UIScrollViewDelegate, MWMFrameworkStorageObserver,
MWMMyTargetDelegate>
@property (weak, nonatomic) IBOutlet UITableView * tableView;
@ -84,9 +84,6 @@ using namespace mwm;
@property (nonatomic) MWMMapDownloaderDataSource * dataSource;
@property (nonatomic) MWMMapDownloaderDefaultDataSource * defaultDataSource;
@property(nonatomic) NSMutableDictionary<NSString *, MWMTableViewCell *> * offscreenCells;
@property (nonatomic) NSMutableDictionary<NSIndexPath *, NSNumber *> * cellHeightCache;
@property (nonatomic) BOOL skipCountryEventProcessing;
@property (nonatomic) BOOL forceFullReload;
@ -176,11 +173,6 @@ using namespace mwm;
[super backTap];
}
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{
[self.cellHeightCache removeAllObjects];
}
- (void)notifyParentController
{
NSArray<MWMViewController *> * viewControllers = [self.navigationController viewControllers];
@ -241,11 +233,6 @@ using namespace mwm;
- (void)configTable
{
self.tableView.separatorColor = [UIColor blackDividers];
if (isIOS7)
{
self.offscreenCells = [@{} mutableCopy];
self.cellHeightCache = [@{} mutableCopy];
}
[self registerCellWithIdentifier:kAdsCellIdentifier];
[self registerCellWithIdentifier:kButtonCellIdentifier];
[self registerCellWithIdentifier:kCountryCellIdentifier];
@ -254,19 +241,6 @@ using namespace mwm;
[self registerCellWithIdentifier:kSubplaceCellIdentifier];
}
#pragma mark - Offscreen cells
- (MWMTableViewCell *)offscreenCellForIdentifier:(NSString *)reuseIdentifier
{
MWMTableViewCell * cell = self.offscreenCells[reuseIdentifier];
if (!cell)
{
cell = [[[NSBundle mainBundle] loadNibNamed:reuseIdentifier owner:nil options:nil] firstObject];
self.offscreenCells[reuseIdentifier] = cell;
}
return cell;
}
#pragma mark - MWMMyTargetDelegate
- (void)onAppWallRefresh { [self reloadTable]; }
@ -468,22 +442,7 @@ using namespace mwm;
MTRGAppwallBannerAdView * adView = [adDataSource viewForBannerAtIndex:indexPath.row];
return [adView sizeThatFits:{CGRectGetWidth(tableView.bounds), 0}].height + 1;
}
if (!isIOS7)
return UITableViewAutomaticDimension;
NSNumber * cacheHeight = self.cellHeightCache[indexPath];
if (cacheHeight)
return cacheHeight.floatValue;
MWMMapDownloaderTableViewCell * cell = static_cast<MWMMapDownloaderTableViewCell *>(
[self offscreenCellForIdentifier:reuseIdentifier]);
[self.dataSource fillCell:cell atIndexPath:indexPath];
cell.bounds = {{}, {CGRectGetWidth(tableView.bounds), CGRectGetHeight(cell.bounds)}};
[cell setNeedsLayout];
[cell layoutIfNeeded];
CGSize const size = [cell.contentView systemLayoutSizeFittingSize:UILayoutFittingCompressedSize];
CGFloat const height = ceil(size.height + 0.5);
self.cellHeightCache[indexPath] = @(height);
return height;
return UITableViewAutomaticDimension;
}
- (CGFloat)tableView:(UITableView *)tableView estimatedHeightForRowAtIndexPath:(NSIndexPath *)indexPath
@ -584,45 +543,23 @@ using namespace mwm;
NSString * title = @(nodeAttrs.m_nodeLocalName.c_str());
BOOL const isMultiParent = (nodeAttrs.m_parentInfo.size() > 1);
NSString * message = (self.dataSource.isParentRoot || isMultiParent)
? nil
: @(nodeAttrs.m_parentInfo[0].m_localName.c_str());
? nil
: @(nodeAttrs.m_parentInfo[0].m_localName.c_str());
if (isIOS7)
{
UIActionSheet * actionSheet = [[UIActionSheet alloc] initWithTitle:title
delegate:self
cancelButtonTitle:nil
destructiveButtonTitle:nil
otherButtonTitles:nil];
[self addButtons:buttons toActionComponent:actionSheet];
[actionSheet showFromRect:cell.frame inView:cellSuperView animated:YES];
}
else
{
UIAlertController * alertController =
[UIAlertController alertControllerWithTitle:title
message:message
preferredStyle:UIAlertControllerStyleActionSheet];
UITableViewCell * cell = [self.tableView cellForRowAtIndexPath:indexPath];
alertController.popoverPresentationController.sourceView = cell;
alertController.popoverPresentationController.sourceRect = cell.bounds;
[self addButtons:buttons toActionComponent:alertController];
[self presentViewController:alertController animated:YES completion:nil];
}
UIAlertController * alertController =
[UIAlertController alertControllerWithTitle:title
message:message
preferredStyle:UIAlertControllerStyleActionSheet];
alertController.popoverPresentationController.sourceView = cell;
alertController.popoverPresentationController.sourceRect = cell.bounds;
[self addButtons:buttons toActionComponent:alertController];
[self presentViewController:alertController animated:YES completion:nil];
}
- (void)addButtons:(ActionButtons)buttons toActionComponent:(id)component
- (void)addButtons:(ActionButtons)buttons toActionComponent:(UIAlertController *)alertController
{
UIActionSheet * actionSheet = nil;
UIAlertController * alertController = nil;
if ([component isKindOfClass:[UIActionSheet class]])
actionSheet = component;
else if ([component isKindOfClass:[UIAlertController class]])
alertController = component;
if (buttons & ShowOnMapAction)
{
[actionSheet addButtonWithTitle:kShowOnMapActionTitle];
UIAlertAction * action = [UIAlertAction actionWithTitle:kShowOnMapActionTitle
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action)
@ -638,7 +575,6 @@ using namespace mwm;
NSString * prefix = nodeAttrs.m_mwmCounter == 1 ? kDownloadActionTitle : kDownloadAllActionTitle;
NSString * title = [NSString stringWithFormat:kAllMapsLabelFormat, prefix,
formattedSize(nodeAttrs.m_mwmSize - nodeAttrs.m_localMwmSize)];
[actionSheet addButtonWithTitle:title];
UIAlertAction * action = [UIAlertAction actionWithTitle:title
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action)
@ -652,7 +588,6 @@ using namespace mwm;
s.GetUpdateInfo(m_actionSheetId, updateInfo);
NSString * title = [NSString stringWithFormat:kAllMapsLabelFormat, kUpdateActionTitle,
formattedSize(updateInfo.m_totalUpdateSizeInBytes)];
[actionSheet addButtonWithTitle:title];
UIAlertAction * action = [UIAlertAction actionWithTitle:title
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action)
@ -662,8 +597,6 @@ using namespace mwm;
if (buttons & CancelDownloadAction)
{
[actionSheet addButtonWithTitle:kCancelDownloadActionTitle];
actionSheet.destructiveButtonIndex = actionSheet.numberOfButtons - 1;
UIAlertAction * action = [UIAlertAction actionWithTitle:kCancelDownloadActionTitle
style:UIAlertActionStyleDestructive
handler:^(UIAlertAction * action)
@ -673,7 +606,6 @@ using namespace mwm;
if (buttons & RetryDownloadAction)
{
[actionSheet addButtonWithTitle:kRetryActionTitle];
UIAlertAction * action = [UIAlertAction actionWithTitle:kRetryActionTitle
style:UIAlertActionStyleDestructive
handler:^(UIAlertAction * action)
@ -683,8 +615,6 @@ using namespace mwm;
if (buttons & DeleteAction)
{
[actionSheet addButtonWithTitle:kDeleteActionTitle];
actionSheet.destructiveButtonIndex = actionSheet.numberOfButtons - 1;
UIAlertAction * action = [UIAlertAction actionWithTitle:kDeleteActionTitle
style:UIAlertActionStyleDestructive
handler:^(UIAlertAction * action)
@ -692,43 +622,12 @@ using namespace mwm;
[alertController addAction:action];
}
if (!IPAD)
{
[actionSheet addButtonWithTitle:kCancelActionTitle];
actionSheet.cancelButtonIndex = actionSheet.numberOfButtons - 1;
}
UIAlertAction * action = [UIAlertAction actionWithTitle:kCancelActionTitle
style:UIAlertActionStyleCancel
handler:nil];
[alertController addAction:action];
}
#pragma mark - UIActionSheetDelegate
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
{
if (actionSheet.numberOfButtons == 0 || buttonIndex >= actionSheet.numberOfButtons || buttonIndex < 0)
{
[actionSheet dismissWithClickedButtonIndex:0 animated:NO];
return;
}
NSString * btnTitle = [actionSheet buttonTitleAtIndex:buttonIndex];
if ([btnTitle rangeOfString:kShowOnMapActionTitle].location != NSNotFound)
[self showNode:m_actionSheetId];
else if ([btnTitle rangeOfString:kDownloadAllActionTitle].location != NSNotFound)
[self downloadNode:m_actionSheetId];
else if ([btnTitle rangeOfString:kDownloadActionTitle].location != NSNotFound)
[self downloadNode:m_actionSheetId];
else if ([btnTitle rangeOfString:kUpdateActionTitle].location != NSNotFound)
[self updateNode:m_actionSheetId];
else if ([btnTitle rangeOfString:kCancelDownloadActionTitle].location != NSNotFound)
[self cancelNode:m_actionSheetId];
else if ([btnTitle rangeOfString:kRetryActionTitle].location != NSNotFound)
[self retryDownloadNode:m_actionSheetId];
else if ([btnTitle rangeOfString:kDeleteActionTitle].location != NSNotFound)
[self deleteNode:m_actionSheetId];
}
#pragma mark - Countries tree(s) navigation
- (void)openAvailableMaps
@ -892,8 +791,6 @@ using namespace mwm;
- (void)reloadTable
{
[self.cellHeightCache removeAllObjects];
UITableView * tableView = self.tableView;
// If these methods are not called, tableView will not call tableView:cellForRowAtIndexPath:
[tableView setNeedsLayout];

View file

@ -27,23 +27,12 @@
[super awakeFromNib];
if (!IPAD)
{
if (isIOS7)
{
self.containerWidth.priority = UILayoutPriorityFittingSizeLevel;
self.containerHeight.priority = UILayoutPriorityFittingSizeLevel;
}
else
{
self.containerWidth.active = NO;
self.containerHeight.active = NO;
}
self.containerWidth.active = NO;
self.containerHeight.active = NO;
}
else
{
if (isIOS7)
self.containerTopOffset.priority = UILayoutPriorityFittingSizeLevel;
else
self.containerTopOffset.active = NO;
self.containerTopOffset.active = NO;
}
[MWMKeyboard addObserver:self];
}

View file

@ -206,7 +206,7 @@ BOOL gIsFirstMyPositionMode = YES;
- (BOOL)hasForceTouch
{
if (isIOS7 || isIOS8)
if (isIOS8)
return NO;
return self.view.traitCollection.forceTouchCapability == UIForceTouchCapabilityAvailable;
}
@ -298,9 +298,6 @@ BOOL gIsFirstMyPositionMode = YES;
- (void)showWelcomeScreenIfNeeded
{
if (isIOS7)
return;
Class<MWMWelcomeControllerProtocol> whatsNewClass = [MWMWhatsNewProfileBookingController class];
BOOL const isFirstSession = [Alohalytics isFirstSession];
Class<MWMWelcomeControllerProtocol> welcomeClass =
@ -356,15 +353,6 @@ BOOL gIsFirstMyPositionMode = YES;
object:nil];
}
- (void)presentViewController:(UIViewController *)viewControllerToPresent
animated:(BOOL)flag
completion:(TMWMVoidBlock)completion
{
if (isIOS7)
self.controlsManager.menuRestoreState = self.controlsManager.menuState;
[super presentViewController:viewControllerToPresent animated:flag completion:completion];
}
- (void)orientationChanged:(NSNotification *)notification
{
[self willRotateToInterfaceOrientation:self.interfaceOrientation duration:0.];

View file

@ -762,9 +762,7 @@ using namespace osm_auth_ios;
[navigationBar setBackgroundImage:nil forBarMetrics:UIBarMetricsDefault];
navigationBar.shadowImage = [UIImage imageWithColor:[UIColor fadeBackground]];
navigationBar.titleTextAttributes = [self navigationBarTextAttributes];
// Workaround for ios 7 crash.
if (!isIOS7)
navigationBar.translucent = NO;
navigationBar.translucent = NO;
}
+ (void)customizeAppearance
@ -790,7 +788,7 @@ using namespace osm_auth_ios;
UISearchBar * searchBar = [UISearchBar appearance];
searchBar.barTintColor = [UIColor primary];
UITextField * textFieldInSearchBar = nil;
if (isIOS7 || isIOS8)
if (isIOS8)
textFieldInSearchBar = [UITextField appearanceWhenContainedIn:[UISearchBar class], nil];
else
textFieldInSearchBar =
@ -1096,7 +1094,7 @@ using namespace osm_auth_ios;
- (MWMMyTarget *)myTarget
{
if (!isIOS7 && !_myTarget)
if (!_myTarget)
_myTarget = [[MWMMyTarget alloc] init];
return _myTarget;
}

View file

@ -99,13 +99,6 @@
self.bounds = {{}, {width, height}};
}
- (void)setBounds:(CGRect)bounds
{
if (isIOS7)
[self updateForSize:bounds.size];
super.bounds = bounds;
}
#pragma mark - Properties
- (void)setState:(MWMMigrationViewState)state

View file

@ -87,13 +87,6 @@ using namespace storage;
[self layoutIfNeeded];
}];
[super layoutSubviews];
if (isIOS7)
{
self.parentNode.preferredMaxLayoutWidth = floor(self.parentNode.width);
self.node.preferredMaxLayoutWidth = floor(self.node.width);
self.nodeSize.preferredMaxLayoutWidth = floor(self.nodeSize.width);
[super layoutSubviews];
}
}
- (void)configDialog

View file

@ -79,7 +79,7 @@ NSString * const kCancelActionTitle = L(@"cancel");
NSString * const kiOSEmail = @"ios@maps.me";
}
@interface MWMHelpController ()<UIActionSheetDelegate, MFMailComposeViewControllerDelegate>
@interface MWMHelpController ()<MFMailComposeViewControllerDelegate>
@property(nonatomic) WebViewController * aboutViewController;
@ -148,25 +148,6 @@ NSString * const kiOSEmail = @"ios@maps.me";
}
- (IBAction)reportBug
{
if (isIOS7)
[self reportIOS7];
else
[self reportRegular];
}
- (void)reportIOS7
{
UIActionSheet * actionSheet =
[[UIActionSheet alloc] initWithTitle:nil
delegate:self
cancelButtonTitle:kCancelActionTitle
destructiveButtonTitle:nil
otherButtonTitles:kCommonReportActionTitle, kBugReportActionTitle, nil];
[actionSheet showInView:self.view];
}
- (void)reportRegular
{
UIAlertController * alert =
[UIAlertController alertControllerWithTitle:L(@"feedback")
@ -270,21 +251,4 @@ NSString * const kiOSEmail = @"ios@maps.me";
[self dismissViewControllerAnimated:YES completion:nil];
}
#pragma mark - UIActionSheetDelegate
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
{
if (actionSheet.numberOfButtons == 0 || buttonIndex >= actionSheet.numberOfButtons ||
buttonIndex < 0)
{
[actionSheet dismissWithClickedButtonIndex:0 animated:NO];
return;
}
NSString * btnTitle = [actionSheet buttonTitleAtIndex:buttonIndex];
if ([btnTitle isEqualToString:kCommonReportActionTitle])
[self commonReportAction];
else if ([btnTitle isEqualToString:kBugReportActionTitle])
[self bugReportAction];
}
@end

View file

@ -48,7 +48,7 @@
if (self.bannersCount != 0)
return;
[self.appWallAd close];
if (isIOS7 || [MWMSettings adServerForbidden] || [MWMSettings adForbidden])
if ([MWMSettings adServerForbidden] || [MWMSettings adForbidden])
return;
self.appWallAd = [[MTRGNativeAppwallAd alloc] initWithSlotId:MY_TARGET_KEY];
self.appWallAd.closeButtonTitle = L(@"close");
@ -74,8 +74,6 @@
+ (void)startAdServerForbiddenCheckTimer
{
if (isIOS7)
return;
MWMMyTarget * manager = [self manager];
[manager checkAdServerForbidden];
[manager.checkAdServerForbiddenTimer invalidate];

View file

@ -17,123 +17,21 @@ NSString * const kLightFontName = @"HelveticaNeue-Light";
+ (UIFont *)regular24 { return [UIFont systemFontOfSize:24]; }
+ (UIFont *)regular32 { return [UIFont systemFontOfSize:32]; }
+ (UIFont *)regular52 { return [UIFont systemFontOfSize:52]; }
+ (UIFont *)medium10
{
CGFloat const size = 10;
if (isIOS7)
return [UIFont fontWithName:kMediumFontName size:size];
return [UIFont systemFontOfSize:size weight:UIFontWeightMedium];
}
+ (UIFont *)medium14
{
CGFloat const size = 14;
if (isIOS7)
return [UIFont fontWithName:kMediumFontName size:size];
return [UIFont systemFontOfSize:size weight:UIFontWeightMedium];
}
+ (UIFont *)medium16
{
CGFloat const size = 16;
if (isIOS7)
return [UIFont fontWithName:kMediumFontName size:size];
return [UIFont systemFontOfSize:size weight:UIFontWeightMedium];
}
+ (UIFont *)medium17
{
CGFloat const size = 17;
if (isIOS7)
return [UIFont fontWithName:kMediumFontName size:size];
return [UIFont systemFontOfSize:size weight:UIFontWeightMedium];
}
+ (UIFont *)medium18
{
CGFloat const size = 18;
if (isIOS7)
return [UIFont fontWithName:kMediumFontName size:size];
return [UIFont systemFontOfSize:size weight:UIFontWeightMedium];
}
+ (UIFont *)medium20
{
CGFloat const size = 20;
if (isIOS7)
return [UIFont fontWithName:kMediumFontName size:size];
return [UIFont systemFontOfSize:size weight:UIFontWeightMedium];
}
+ (UIFont *)medium24
{
CGFloat const size = 24;
if (isIOS7)
return [UIFont fontWithName:kMediumFontName size:size];
return [UIFont systemFontOfSize:size weight:UIFontWeightMedium];
}
+ (UIFont *)medium28
{
CGFloat const size = 28;
if (isIOS7)
return [UIFont fontWithName:kMediumFontName size:size];
return [UIFont systemFontOfSize:size weight:UIFontWeightMedium];
}
+ (UIFont *)medium36
{
CGFloat const size = 36;
if (isIOS7)
return [UIFont fontWithName:kMediumFontName size:size];
return [UIFont systemFontOfSize:size weight:UIFontWeightMedium];
}
+ (UIFont *)medium40
{
CGFloat const size = 40;
if (isIOS7)
return [UIFont fontWithName:kMediumFontName size:size];
return [UIFont systemFontOfSize:size weight:UIFontWeightMedium];
}
+ (UIFont *)medium44
{
CGFloat const size = 44;
if (isIOS7)
return [UIFont fontWithName:kMediumFontName size:size];
return [UIFont systemFontOfSize:size weight:UIFontWeightMedium];
}
+ (UIFont *)light10
{
CGFloat const size = 10;
if (isIOS7)
return [UIFont fontWithName:kLightFontName size:size];
return [UIFont systemFontOfSize:size weight:UIFontWeightLight];
}
+ (UIFont *)light12
{
CGFloat const size = 12;
if (isIOS7)
return [UIFont fontWithName:kLightFontName size:size];
return [UIFont systemFontOfSize:size weight:UIFontWeightLight];
}
+ (UIFont *)light16
{
CGFloat const size = 16;
if (isIOS7)
return [UIFont fontWithName:kLightFontName size:size];
return [UIFont systemFontOfSize:size weight:UIFontWeightLight];
}
+ (UIFont *)light17
{
CGFloat const size = 17;
if (isIOS7)
return [UIFont fontWithName:kLightFontName size:size];
return [UIFont systemFontOfSize:size weight:UIFontWeightLight];
}
+ (UIFont *)medium10 { return [UIFont systemFontOfSize:10 weight:UIFontWeightMedium]; }
+ (UIFont *)medium14 { return [UIFont systemFontOfSize:14 weight:UIFontWeightMedium]; }
+ (UIFont *)medium16 { return [UIFont systemFontOfSize:16 weight:UIFontWeightMedium]; }
+ (UIFont *)medium17 { return [UIFont systemFontOfSize:17 weight:UIFontWeightMedium]; }
+ (UIFont *)medium18 { return [UIFont systemFontOfSize:18 weight:UIFontWeightMedium]; }
+ (UIFont *)medium20 { return [UIFont systemFontOfSize:20 weight:UIFontWeightMedium]; }
+ (UIFont *)medium24 { return [UIFont systemFontOfSize:24 weight:UIFontWeightMedium]; }
+ (UIFont *)medium28 { return [UIFont systemFontOfSize:28 weight:UIFontWeightMedium]; }
+ (UIFont *)medium36 { return [UIFont systemFontOfSize:36 weight:UIFontWeightMedium]; }
+ (UIFont *)medium40 { return [UIFont systemFontOfSize:40 weight:UIFontWeightMedium]; }
+ (UIFont *)medium44 { return [UIFont systemFontOfSize:44 weight:UIFontWeightMedium]; }
+ (UIFont *)light10 { return [UIFont systemFontOfSize:10 weight:UIFontWeightLight]; }
+ (UIFont *)light12 { return [UIFont systemFontOfSize:12 weight:UIFontWeightLight]; }
+ (UIFont *)light16 { return [UIFont systemFontOfSize:16 weight:UIFontWeightLight]; }
+ (UIFont *)light17 { return [UIFont systemFontOfSize:17 weight:UIFontWeightLight]; }
+ (UIFont *)bold12 { return [UIFont boldSystemFontOfSize:12]; }
+ (UIFont *)bold14 { return [UIFont boldSystemFontOfSize:14]; }
+ (UIFont *)bold16 { return [UIFont boldSystemFontOfSize:16]; }

View file

@ -21,8 +21,6 @@
OBJC_ASSOCIATION_RETAIN_NONATOMIC);
if (mwm_coloring == MWMImageColoringOther)
return;
if (isIOS7)
[self makeImageAlwaysTemplate];
[self applyColoring];
}
@ -37,8 +35,6 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
self.tintColor = [[UIColor class] performSelector:self.coloringSelector];
if (isIOS7 && self.mwm_coloring == MWMImageColoringSeparator)
self.backgroundColor = [[UIColor class] performSelector:self.coloringSelector];
#pragma clang diagnostic pop
}
@ -52,8 +48,6 @@
[UIColor isNightMode] ? @"dark" : @"light"]];
return;
}
if (isIOS7)
[self makeImageAlwaysTemplate];
[self applyColoring];
}