From e85ac9d4dae886f24a5377467cef28444b4c80f1 Mon Sep 17 00:00:00 2001 From: Alexander Boriskov Date: Fri, 17 Jan 2020 15:59:02 +0300 Subject: [PATCH] [iOS] Added new style system --- .../Categories/CALayer+RuntimeAttributes.h | 8 - .../Categories/CALayer+RuntimeAttributes.m | 35 -- .../RatingSummaryView+DefaultConfig.swift | 10 - .../Categories/UIButton+RuntimeAttributes.h | 13 +- .../Categories/UIButton+RuntimeAttributes.m | 75 ----- iphone/Maps/Categories/UIColor+MapsMeColor.h | 93 ++---- iphone/Maps/Categories/UIColor+MapsMeColor.m | 231 ++------------ iphone/Maps/Categories/UIFont+MapsMeFonts.h | 72 ++--- iphone/Maps/Categories/UIFont+MapsMeFonts.m | 32 -- iphone/Maps/Categories/UIKitCategories.h | 2 - iphone/Maps/Categories/UIKitCategories.m | 95 ------ .../Categories/UILabel+RuntimeAttributes.m | 10 - .../Categories/UISwitch+RuntimeAttributes.h | 3 - .../Categories/UISwitch+RuntimeAttributes.m | 10 - .../UITextField+RuntimeAttributes.m | 10 - .../Categories/UITextView+RuntimeAttributes.m | 22 -- .../Categories/UIView+RuntimeAttributes.h | 5 - .../Categories/UIView+RuntimeAttributes.m | 17 - iphone/Maps/Core/Theme/AdsStyleSheet.swift | 48 +++ iphone/Maps/Core/Theme/AuthStyleSheet.swift | 28 ++ .../Maps/Core/Theme/BookmarksStyleSheet.swift | 26 ++ iphone/Maps/Core/Theme/Colors.swift | 129 ++++++++ .../Maps/Core/Theme/Components/IColors.swift | 74 +++++ .../Maps/Core/Theme/Components/IFonts.swift | 50 +++ iphone/Maps/Core/Theme/Core/IStyleSheet.swift | 3 + iphone/Maps/Core/Theme/Core/Style.swift | 280 ++++++++++++++++ .../Maps/Core/Theme/Core/StyleManager.swift | 84 +++++ iphone/Maps/Core/Theme/Core/Theme.swift | 85 +++++ .../Theme/Core}/ThemeManager.swift | 33 +- .../Maps/Core/Theme/DiscoveryStyleSheet.swift | 27 ++ .../Maps/Core/Theme/Extensions/SwizzleStyle.h | 11 + .../Maps/Core/Theme/Extensions/SwizzleStyle.m | 34 ++ .../Core/Theme/Extensions/UIColor+image.swift | 11 + .../Core/Theme/Extensions/UIColor+rgba.swift | 5 + .../Theme/Extensions/UIView+styleName.swift | 42 +++ iphone/Maps/Core/Theme/FontStyleSheet.swift | 176 +++++++++++ iphone/Maps/Core/Theme/Fonts.swift | 49 +++ iphone/Maps/Core/Theme/GlobalStyleSheet.swift | 298 ++++++++++++++++++ iphone/Maps/Core/Theme/MainTheme.swift | 14 + iphone/Maps/Core/Theme/MapStyleSheet.swift | 172 ++++++++++ .../Theme/Renderers/CheckmarkRenderer.swift | 24 ++ .../Theme/Renderers/MWMButtonRenderer.swift | 20 ++ .../Renderers/MWMTableViewCellRenderer.swift | 43 +++ .../Renderers/RatingSummaryViewRenderer.swift | 34 ++ .../Theme/Renderers/TabViewRenderer.swift | 29 ++ .../UIActivityIndicatorRenderer.swift | 15 + .../Renderers/UIBarButtonItemRenderer.swift | 18 ++ .../Theme/Renderers/UIButtonRenderer.swift | 54 ++++ .../Theme/Renderers/UIImageRenderer.swift | 22 ++ .../Theme/Renderers/UILabelRenderer.swift | 62 ++++ .../Renderers/UINavigationBarRenderer.swift | 33 ++ .../Renderers/UINavigationItemRenderer.swift | 20 ++ .../Renderers/UIPageControlRenderer.swift | 25 ++ .../Theme/Renderers/UISearchBarRenderer.swift | 35 ++ .../Theme/Renderers/UISwitchRenderer.swift | 19 ++ .../Renderers/UITableViewCellRenderer.swift | 39 +++ .../UITableViewHeaderFooterViewRenderer.swift | 24 ++ .../Theme/Renderers/UITableViewRenderer.swift | 24 ++ .../Theme/Renderers/UITextFieldRenderer.swift | 33 ++ .../Theme/Renderers/UITextViewRenderer.swift | 27 ++ .../Theme/Renderers/UIToolbarRenderer.swift | 18 ++ .../Renderers/UIViewControllerRenderer.swift | 4 + .../Core/Theme/Renderers/UIViewRenderer.swift | 57 ++++ .../Theme/Renderers/UIWindowRenderer.swift | 21 ++ iphone/Maps/Core/Theme/SearchStyleSheet.swift | 106 +++++++ .../Core/Theme/SubscriptionsStyleSheet.swift | 110 +++++++ iphone/Maps/Maps.xcodeproj/project.pbxproj | 270 +++++++++++++--- 67 files changed, 2891 insertions(+), 717 deletions(-) delete mode 100644 iphone/Maps/Categories/CALayer+RuntimeAttributes.h delete mode 100644 iphone/Maps/Categories/CALayer+RuntimeAttributes.m delete mode 100644 iphone/Maps/Categories/RatingSummaryView+DefaultConfig.swift delete mode 100644 iphone/Maps/Categories/UISwitch+RuntimeAttributes.h delete mode 100644 iphone/Maps/Categories/UISwitch+RuntimeAttributes.m delete mode 100644 iphone/Maps/Categories/UIView+RuntimeAttributes.h delete mode 100644 iphone/Maps/Categories/UIView+RuntimeAttributes.m create mode 100644 iphone/Maps/Core/Theme/AdsStyleSheet.swift create mode 100644 iphone/Maps/Core/Theme/AuthStyleSheet.swift create mode 100644 iphone/Maps/Core/Theme/BookmarksStyleSheet.swift create mode 100644 iphone/Maps/Core/Theme/Colors.swift create mode 100644 iphone/Maps/Core/Theme/Components/IColors.swift create mode 100644 iphone/Maps/Core/Theme/Components/IFonts.swift create mode 100644 iphone/Maps/Core/Theme/Core/IStyleSheet.swift create mode 100644 iphone/Maps/Core/Theme/Core/Style.swift create mode 100644 iphone/Maps/Core/Theme/Core/StyleManager.swift create mode 100644 iphone/Maps/Core/Theme/Core/Theme.swift rename iphone/Maps/{UI/Appearance => Core/Theme/Core}/ThemeManager.swift (60%) create mode 100644 iphone/Maps/Core/Theme/DiscoveryStyleSheet.swift create mode 100644 iphone/Maps/Core/Theme/Extensions/SwizzleStyle.h create mode 100644 iphone/Maps/Core/Theme/Extensions/SwizzleStyle.m create mode 100644 iphone/Maps/Core/Theme/Extensions/UIColor+image.swift create mode 100644 iphone/Maps/Core/Theme/Extensions/UIColor+rgba.swift create mode 100644 iphone/Maps/Core/Theme/Extensions/UIView+styleName.swift create mode 100644 iphone/Maps/Core/Theme/FontStyleSheet.swift create mode 100644 iphone/Maps/Core/Theme/Fonts.swift create mode 100644 iphone/Maps/Core/Theme/GlobalStyleSheet.swift create mode 100644 iphone/Maps/Core/Theme/MainTheme.swift create mode 100644 iphone/Maps/Core/Theme/MapStyleSheet.swift create mode 100644 iphone/Maps/Core/Theme/Renderers/CheckmarkRenderer.swift create mode 100644 iphone/Maps/Core/Theme/Renderers/MWMButtonRenderer.swift create mode 100644 iphone/Maps/Core/Theme/Renderers/MWMTableViewCellRenderer.swift create mode 100644 iphone/Maps/Core/Theme/Renderers/RatingSummaryViewRenderer.swift create mode 100644 iphone/Maps/Core/Theme/Renderers/TabViewRenderer.swift create mode 100644 iphone/Maps/Core/Theme/Renderers/UIActivityIndicatorRenderer.swift create mode 100644 iphone/Maps/Core/Theme/Renderers/UIBarButtonItemRenderer.swift create mode 100644 iphone/Maps/Core/Theme/Renderers/UIButtonRenderer.swift create mode 100644 iphone/Maps/Core/Theme/Renderers/UIImageRenderer.swift create mode 100644 iphone/Maps/Core/Theme/Renderers/UILabelRenderer.swift create mode 100644 iphone/Maps/Core/Theme/Renderers/UINavigationBarRenderer.swift create mode 100644 iphone/Maps/Core/Theme/Renderers/UINavigationItemRenderer.swift create mode 100644 iphone/Maps/Core/Theme/Renderers/UIPageControlRenderer.swift create mode 100644 iphone/Maps/Core/Theme/Renderers/UISearchBarRenderer.swift create mode 100644 iphone/Maps/Core/Theme/Renderers/UISwitchRenderer.swift create mode 100644 iphone/Maps/Core/Theme/Renderers/UITableViewCellRenderer.swift create mode 100644 iphone/Maps/Core/Theme/Renderers/UITableViewHeaderFooterViewRenderer.swift create mode 100644 iphone/Maps/Core/Theme/Renderers/UITableViewRenderer.swift create mode 100644 iphone/Maps/Core/Theme/Renderers/UITextFieldRenderer.swift create mode 100644 iphone/Maps/Core/Theme/Renderers/UITextViewRenderer.swift create mode 100644 iphone/Maps/Core/Theme/Renderers/UIToolbarRenderer.swift create mode 100644 iphone/Maps/Core/Theme/Renderers/UIViewControllerRenderer.swift create mode 100644 iphone/Maps/Core/Theme/Renderers/UIViewRenderer.swift create mode 100644 iphone/Maps/Core/Theme/Renderers/UIWindowRenderer.swift create mode 100644 iphone/Maps/Core/Theme/SearchStyleSheet.swift create mode 100644 iphone/Maps/Core/Theme/SubscriptionsStyleSheet.swift diff --git a/iphone/Maps/Categories/CALayer+RuntimeAttributes.h b/iphone/Maps/Categories/CALayer+RuntimeAttributes.h deleted file mode 100644 index 6d0d02097a..0000000000 --- a/iphone/Maps/Categories/CALayer+RuntimeAttributes.h +++ /dev/null @@ -1,8 +0,0 @@ -#import - -@interface CALayer (RuntimeAttributes) - -@property (nonatomic, assign) UIColor *borderUIColor; -@property (nonatomic, assign) UIColor *shadowUIColor; - -@end diff --git a/iphone/Maps/Categories/CALayer+RuntimeAttributes.m b/iphone/Maps/Categories/CALayer+RuntimeAttributes.m deleted file mode 100644 index c13f1c85b6..0000000000 --- a/iphone/Maps/Categories/CALayer+RuntimeAttributes.m +++ /dev/null @@ -1,35 +0,0 @@ -#import "CALayer+RuntimeAttributes.h" - -@implementation CALayer (RuntimeAttributes) - -- (void)setBorderUIColor:(UIColor *)borderUIColor -{ - self.borderColor = borderUIColor.CGColor; -} - -- (UIColor *)borderUIColor -{ - return [UIColor colorWithCGColor:self.borderColor]; -} - -- (void)setBorderColorName:(NSString *)colorName -{ - self.borderColor = [UIColor colorWithName:colorName].CGColor; -} - -- (void)setShadowUIColor:(UIColor *)shadowUIColor -{ - self.shadowColor = shadowUIColor.CGColor; -} - -- (UIColor *)shadowUIColor -{ - return [UIColor colorWithCGColor:self.shadowColor]; -} - -- (void)setShadowColorName:(NSString *)colorName -{ - self.shadowColor = [UIColor colorWithName:colorName].CGColor; -} - -@end diff --git a/iphone/Maps/Categories/RatingSummaryView+DefaultConfig.swift b/iphone/Maps/Categories/RatingSummaryView+DefaultConfig.swift deleted file mode 100644 index ad9acc57a0..0000000000 --- a/iphone/Maps/Categories/RatingSummaryView+DefaultConfig.swift +++ /dev/null @@ -1,10 +0,0 @@ -extension RatingSummaryView { - func defaultConfig() { - noValueColor = UIColor.blackSecondaryText() - horribleColor = UIColor.ratingRed() - badColor = UIColor.ratingOrange() - normalColor = UIColor.ratingYellow() - goodColor = UIColor.ratingLightGreen() - excellentColor = UIColor.ratingGreen() - } -} diff --git a/iphone/Maps/Categories/UIButton+RuntimeAttributes.h b/iphone/Maps/Categories/UIButton+RuntimeAttributes.h index a468ff38f8..beb5a67f4c 100644 --- a/iphone/Maps/Categories/UIButton+RuntimeAttributes.h +++ b/iphone/Maps/Categories/UIButton+RuntimeAttributes.h @@ -1,18 +1,7 @@ #import -@interface UIButton (RuntimeAttributes) +@interface UIButton (RuntimeAttributes_dep) @property(copy, nonatomic) NSString * localizedText; -- (void)setBackgroundColorName:(NSString *)colorName; -- (NSString *)backgroundColorName; -- (void)setBackgroundHighlightedColorName:(NSString *)colorName; -- (NSString *)backgroundHighlightedColorName; -- (void)setBackgroundSelectedColorName:(NSString *)colorName; -- (NSString *)backgroundSelectedColorName; -- (void)setTintColorName:(NSString *)colorName; -- (NSString *)tintColorName; - -- (void)setBackgroundColor:(UIColor *)color forState:(UIControlState)state; - @end diff --git a/iphone/Maps/Categories/UIButton+RuntimeAttributes.m b/iphone/Maps/Categories/UIButton+RuntimeAttributes.m index ccdd9d0446..c3509b21f0 100644 --- a/iphone/Maps/Categories/UIButton+RuntimeAttributes.m +++ b/iphone/Maps/Categories/UIButton+RuntimeAttributes.m @@ -15,79 +15,4 @@ return L(title); } -- (void)setFontName:(NSString *)fontName { self.titleLabel.font = [UIFont fontWithName:fontName]; } -- (void)setTextColorName:(NSString *)colorName -{ - [self setTitleColor:[UIColor colorWithName:colorName] forState:UIControlStateNormal]; -} - -- (void)setTextColorHighlightedName:(NSString *)colorName -{ - [self setTitleColor:[UIColor colorWithName:colorName] forState:UIControlStateHighlighted]; -} - -- (void)setTextColorDisabledName:(NSString *)colorName -{ - [self setTitleColor:[UIColor colorWithName:colorName] forState:UIControlStateDisabled]; -} - -- (void)setTextColorSelectedName:(NSString *)colorName -{ - [self setTitleColor:[UIColor colorWithName:colorName] forState:UIControlStateSelected]; -} - -- (void)setBackgroundColorName:(NSString *)colorName -{ - objc_setAssociatedObject(self, @selector(backgroundColorName), colorName, - OBJC_ASSOCIATION_COPY_NONATOMIC); - [self setBackgroundColor:[UIColor colorWithName:colorName] forState:UIControlStateNormal]; -} - -- (NSString *)backgroundColorName -{ - return objc_getAssociatedObject(self, @selector(backgroundColorName)); -} - -- (void)setBackgroundHighlightedColorName:(NSString *)colorName -{ - objc_setAssociatedObject(self, @selector(backgroundHighlightedColorName), colorName, - OBJC_ASSOCIATION_COPY_NONATOMIC); - [self setBackgroundColor:[UIColor colorWithName:colorName] forState:UIControlStateHighlighted]; -} - -- (NSString *)backgroundHighlightedColorName -{ - return objc_getAssociatedObject(self, @selector(backgroundHighlightedColorName)); -} - -- (void)setBackgroundSelectedColorName:(NSString *)colorName -{ - objc_setAssociatedObject(self, @selector(backgroundSelectedColorName), colorName, - OBJC_ASSOCIATION_COPY_NONATOMIC); - [self setBackgroundColor:[UIColor colorWithName:colorName] forState:UIControlStateSelected]; -} - -- (NSString *)backgroundSelectedColorName -{ - return objc_getAssociatedObject(self, @selector(backgroundSelectedColorName)); -} - -- (void)setTintColorName:(NSString *)colorName -{ - objc_setAssociatedObject(self, @selector(tintColorName), colorName, - OBJC_ASSOCIATION_COPY_NONATOMIC); - [self setTintColor:[UIColor colorWithName:colorName]]; -} - -- (NSString *)tintColorName -{ - return objc_getAssociatedObject(self, @selector(tintColorName)); -} - -- (void)setBackgroundColor:(UIColor *)color forState:(UIControlState)state -{ - [self setBackgroundColor:UIColor.clearColor]; - [self setBackgroundImage:[UIImage imageWithColor:color] forState:state]; -} - @end diff --git a/iphone/Maps/Categories/UIColor+MapsMeColor.h b/iphone/Maps/Categories/UIColor+MapsMeColor.h index 04eb88e84a..032f903769 100644 --- a/iphone/Maps/Categories/UIColor+MapsMeColor.h +++ b/iphone/Maps/Categories/UIColor+MapsMeColor.h @@ -4,78 +4,39 @@ NS_ASSUME_NONNULL_BEGIN @interface UIColor (MapsMeColor) -+ (UIColor *)primaryDark; -+ (UIColor *)primary; -+ (UIColor *)secondary; -+ (UIColor *)primaryLight; -+ (UIColor *)fadeBackground; -+ (UIColor *)menuBackground; -+ (UIColor *)downloadBadgeBackground; -+ (UIColor *)pressBackground; -+ (UIColor *)yellow; -+ (UIColor *)green; -+ (UIColor *)red; -+ (UIColor *)errorPink; -+ (UIColor *)orange; -+ (UIColor *)linkBlue; -+ (UIColor *)linkBlueHighlighted; -+ (UIColor *)linkBlueDark; -+ (UIColor *)buttonRed; -+ (UIColor *)buttonRedHighlighted; -+ (UIColor *)blackPrimaryText; -+ (UIColor *)blackSecondaryText; -+ (UIColor *)blackStatusBarBackground; -+ (UIColor *)blackHintText; -+ (UIColor *)blackDividers; -+ (UIColor *)white; -+ (UIColor *)whitePrimaryText; -+ (UIColor *)whitePrimaryTextHighlighted; -+ (UIColor *)whiteSecondaryText; -+ (UIColor *)whiteHintText; -+ (UIColor *)whiteDividers; -+ (UIColor *)buttonDisabledBlueText; -+ (UIColor *)buttonHighlightedBlueText; -+ (UIColor *)alertBackground; -+ (UIColor *)blackOpaque; -+ (UIColor *)bookingBackground; -+ (UIColor *)opentableBackground; -+ (UIColor *)bannerBackground; -+ (UIColor *)bannerButtonBackground; -+ (UIColor *)toastBackground; -+ (UIColor *)statusBarBackground; -+ (UIColor *)transparentGreen; -+ (UIColor *)ratingRed; -+ (UIColor *)ratingOrange; -+ (UIColor *)ratingYellow; -+ (UIColor *)ratingLightGreen; -+ (UIColor *)ratingGreen; -+ (UIColor *)border; -+ (UIColor *)speedLimitRed; -+ (UIColor *)speedLimitGeen; -+ (UIColor *)speedLimitWhite; -+ (UIColor *)speedLimitLightGray; -+ (UIColor *)speedLimitDarkGray; -+ (UIColor *)shadowColorBlue; -+ (UIColor *)shadowColorPurple; -+ (UIColor *)subscriptionCellBorder; -+ (UIColor *)subscriptionCellBackground; -+ (UIColor *)subscriptionCellTitle; -+ (UIColor *)discountBackground; -+ (UIColor *)discountText; -+ (UIColor *)bookmarkSubscriptionScrollBackground; -+ (UIColor *)bookmarkSubscriptionBackground; -+ (UIColor *)bookmarkSubscriptionFooterBackground; ++ (UIColor *)blackPrimaryText __attribute__ ((deprecated)); ++ (UIColor *)blackSecondaryText __attribute__ ((deprecated)); ++ (UIColor *)blackHintText __attribute__ ((deprecated)); ++ (UIColor *)red __attribute__ ((deprecated)); ++ (UIColor *)white __attribute__ ((deprecated)); ++ (UIColor *)primary __attribute__ ((deprecated)); ++ (UIColor *)pressBackground __attribute__ ((deprecated)); ++ (UIColor *)linkBlue __attribute__ ((deprecated)); ++ (UIColor *)linkBlueHighlighted __attribute__ ((deprecated)); ++ (UIColor *)buttonRed __attribute__ ((deprecated)); ++ (UIColor *)blackDividers __attribute__ ((deprecated)); ++ (UIColor *)whitePrimaryText __attribute__ ((deprecated)); ++ (UIColor *)whitePrimaryTextHighlighted __attribute__ ((deprecated)); ++ (UIColor *)whiteHintText __attribute__ ((deprecated)); ++ (UIColor *)buttonDisabledBlueText __attribute__ ((deprecated)); ++ (UIColor *)blackOpaque __attribute__ ((deprecated)); ++ (UIColor *)bookingBackground __attribute__ ((deprecated)); ++ (UIColor *)opentableBackground __attribute__ ((deprecated)); ++ (UIColor *)bannerBackground __attribute__ ((deprecated)); ++ (UIColor *)transparentGreen __attribute__ ((deprecated)); ++ (UIColor *)speedLimitRed __attribute__ ((deprecated)); ++ (UIColor *)speedLimitGeen __attribute__ ((deprecated)); ++ (UIColor *)speedLimitWhite __attribute__ ((deprecated)); ++ (UIColor *)speedLimitLightGray __attribute__ ((deprecated)); ++ (UIColor *)speedLimitDarkGray __attribute__ ((deprecated)); -+ (UIColor *)colorWithName:(NSString *)colorName; ++ (UIColor *)colorWithName:(NSString *)colorName __attribute__ ((deprecated)); + (UIColor *)colorFromHexString:(NSString *)hexString; + (void)setNightMode:(BOOL)mode; + (BOOL)isNightMode; -- (UIColor *)opposite; - -+ (UIColor *)facebookButtonBackground; -+ (UIColor *)facebookButtonBackgroundDisabled; +- (UIColor *)opposite __attribute__ ((deprecated)); @end diff --git a/iphone/Maps/Categories/UIColor+MapsMeColor.m b/iphone/Maps/Categories/UIColor+MapsMeColor.m index 320567aafa..768d2fe359 100644 --- a/iphone/Maps/Categories/UIColor+MapsMeColor.m +++ b/iphone/Maps/Categories/UIColor+MapsMeColor.m @@ -1,5 +1,6 @@ #import "UIColorRoutines.h" #import "UIColor+MapsMeColor.h" +#import "SwiftBridge.h" static BOOL isNightMode = NO; static NSDictionary *day; @@ -149,27 +150,10 @@ static UIColor * color(SEL cmd) { return color ?: self; } -// Dark green color -+ (UIColor *)primaryDark -{ - return color(_cmd); -} - // Green color + (UIColor *)primary { - return color(_cmd); -} - -+ (UIColor *)secondary -{ - return color(_cmd); -} - -// Light green color -+ (UIColor *)primaryLight -{ - return color(_cmd); + return [StyleManager instance].theme.colors.primary; } // Use for opaque fullscreen @@ -178,91 +162,59 @@ static UIColor * color(SEL cmd) { return [UIColor colorWithWhite:0. alpha:alpha80]; } -+ (UIColor *)menuBackground -{ - return color(_cmd); -} - -+ (UIColor *)downloadBadgeBackground -{ - return color(_cmd); -} // Background color && press color + (UIColor *)pressBackground { - return color(_cmd); + return [StyleManager instance].theme.colors.pressBackground; } // Red color (use for status closed in place page) + (UIColor *)red { - return color(_cmd); -} -// Yellow color (use for hotel's stars) -+ (UIColor *)yellow -{ - return [UIColor colorWithRed:scaled(255.) green:scaled(200.) blue:scaled(40.) alpha:alpha100]; -} -// Green color (use for booking rating) -+ (UIColor *)green -{ - return [UIColor colorWithRed:scaled(85.) green:scaled(139.) blue:scaled(47.) alpha:alpha100]; -} -// Pink background for invalid fields -+ (UIColor *)errorPink -{ - return color(_cmd); -} -// Orange color (use for status 15 min in place page) -+ (UIColor *)orange -{ - return color(_cmd); + return [StyleManager instance].theme.colors.red; } // Blue color (use for links and phone numbers) + (UIColor *)linkBlue { - return color(_cmd); + return [StyleManager instance].theme.colors.linkBlue; } + (UIColor *)linkBlueHighlighted { - return color(_cmd); + return [StyleManager instance].theme.colors.linkBlueHighlighted; } + (UIColor *)linkBlueDark { - return color(_cmd); + return [StyleManager instance].theme.colors.linkBlueDark; +} ++ (UIColor *)buttonRed +{ + return [StyleManager instance].theme.colors.buttonRed; } -+ (UIColor *)buttonRed { return color(_cmd); } -+ (UIColor *)buttonRedHighlighted { return color(_cmd); } + (UIColor *)blackPrimaryText { - return color(_cmd); + return [StyleManager instance].theme.colors.blackPrimaryText; } + (UIColor *)blackSecondaryText { - return color(_cmd); -} - -+ (UIColor *)blackStatusBarBackground -{ - return [UIColor colorWithWhite:0. alpha:alpha40]; + return [StyleManager instance].theme.colors.blackSecondaryText; } + (UIColor *)blackHintText { - return color(_cmd); + return [StyleManager instance].theme.colors.blackHintText; } + (UIColor *)blackDividers { - return color(_cmd); + return [StyleManager instance].theme.colors.blackDividers; } + (UIColor *)white { - return color(_cmd); + return [StyleManager instance].theme.colors.white; } + (UIColor *)whitePrimaryText @@ -276,24 +228,14 @@ static UIColor * color(SEL cmd) { return [UIColor colorWithWhite:1. alpha:alpha30]; } -+ (UIColor *)whiteSecondaryText -{ - return color(_cmd); -} - + (UIColor *)whiteHintText { - return color(_cmd); -} - -+ (UIColor *)whiteDividers -{ - return [UIColor colorWithWhite:1. alpha:alpha12]; + return [StyleManager instance].theme.colors.whiteHintText; } + (UIColor *)buttonDisabledBlueText { - return color(_cmd); + return [StyleManager instance].theme.colors.buttonDisabledBlueText; } + (UIColor *)buttonHighlightedBlueText @@ -301,14 +243,9 @@ static UIColor * color(SEL cmd) { return [UIColor colorWithRed:scaled(3.) green:scaled(122.) blue:scaled(255.) alpha:alpha54]; } -+ (UIColor *)alertBackground -{ - return color(_cmd); -} - + (UIColor *)blackOpaque { - return color(_cmd); + return [StyleManager instance].theme.colors.blackOpaque; } + (UIColor *)bookingBackground @@ -326,48 +263,11 @@ static UIColor * color(SEL cmd) { return [UIColor colorWithRed:scaled(233) green:scaled(244) blue:scaled(233) alpha:alpha26]; } -+ (UIColor *)ratingRed -{ - return [UIColor colorWithRed:scaled(229) green:scaled(57) blue:scaled(53) alpha:alpha100]; -} - -+ (UIColor *)ratingOrange -{ - return [UIColor colorWithRed:scaled(244) green:scaled(81) blue:scaled(30) alpha:alpha100]; -} - -+ (UIColor *)ratingYellow -{ - return [UIColor colorWithRed:scaled(245) green:scaled(176) blue:scaled(39) alpha:alpha100]; -} - -+ (UIColor *)ratingLightGreen -{ - return [UIColor colorWithRed:scaled(124) green:scaled(179) blue:scaled(66) alpha:alpha100]; -} - -+ (UIColor *)ratingGreen -{ - return [UIColor colorWithRed:scaled(67) green:scaled(160) blue:scaled(71) alpha:alpha100]; -} - + (UIColor *)bannerBackground { - return color(_cmd); + return [StyleManager instance].theme.colors.bannerBackground; } -+ (UIColor *)border -{ - return color(_cmd); -} - -+ (UIColor *)bannerButtonBackground -{ - return [UIColor blackDividers]; -} - -+ (UIColor *)toastBackground { return color(_cmd); } -+ (UIColor *)statusBarBackground { return color(_cmd); } + (UIColor *)colorWithName:(NSString *)colorName { #pragma clang diagnostic push @@ -376,14 +276,6 @@ static UIColor * color(SEL cmd) { #pragma clang diagnostic pop } -+ (UIColor *)facebookButtonBackground { - return [UIColor colorWithRed:scaled(59) green:scaled(89) blue:scaled(152) alpha:alpha100]; -} - -+ (UIColor *)facebookButtonBackgroundDisabled { - return [self.facebookButtonBackground colorWithAlphaComponent:alpha70]; -} - + (UIColor *)speedLimitRed { return [UIColor colorWithRed:scaled(224) green:scaled(31) blue:scaled(31) alpha:alpha100]; } @@ -403,87 +295,4 @@ static UIColor * color(SEL cmd) { + (UIColor *)speedLimitDarkGray { return [UIColor colorWithRed:scaled(51) green:scaled(51) blue:scaled(50) alpha:alpha100]; } - -+ (UIColor *)shadowColorBlue { - return [UIColor colorWithRed:scaled(5) green:scaled(70) blue:scaled(134) alpha:alpha100]; -} - -+ (UIColor *)shadowColorPurple { - return [UIColor colorWithRed:scaled(88) green:scaled(0) blue:scaled(153) alpha:alpha100]; -} - -+ (UIColor *)subscriptionCellBorder { - return [UIColor colorWithRed:scaled(174) green:scaled(184) blue:scaled(190) alpha:alpha100]; -} - -+ (UIColor *)subscriptionCellBackground { - return [UIColor colorWithRed:scaled(208) green:scaled(246) blue:scaled(255) alpha:alpha100]; -} - -+ (UIColor *)subscriptionCellTitle { - return [UIColor colorWithRed:scaled(14) green:scaled(101) blue:scaled(188) alpha:alpha100]; -} - - -+ (UIColor *)discountBackground -{ - return color(_cmd); -} - -+ (UIColor *)discountText -{ - return color(_cmd); -} - -+ (UIColor *)bookmarkSubscriptionScrollBackground -{ - return color(_cmd); -} - -+ (UIColor *)bookmarkSubscriptionBackground -{ - return color(_cmd); -} - -+ (UIColor *)bookmarkSubscriptionFooterBackground -{ - return color(_cmd); -} - -//NO NIGHT COLORS -+ (UIColor *)allPassSubscriptionTitle -{ - return [UIColor colorWithWhite:1. alpha:alpha40]; -} - -+ (UIColor *)allPassSubscriptionDescription -{ - return [UIColor colorWithWhite:1. alpha:alpha100]; -} - -+ (UIColor *)allPassSubscriptionSubTitle -{ - return [UIColor colorWithRed:scaled(30.) green:scaled(150.) blue:scaled(240.) alpha:alpha100]; -} - -+ (UIColor *)allPassSubscriptionMonthlyBackground -{ - return [UIColor colorWithWhite:0.88 alpha:alpha80]; -} - -+ (UIColor *)allPassSubscriptionMonthlyTitle -{ - return [UIColor colorWithWhite:0 alpha:alpha87]; -} - -+ (UIColor *)allPassSubscriptionDiscountBackground -{ - return [UIColor colorWithRed:scaled(245.) green:scaled(210.) blue:scaled(12.) alpha:alpha100]; -} - -+ (UIColor *)allPassSubscriptionTermsTitle -{ - return [UIColor colorWithWhite:1 alpha:alpha70]; -} -//END NO NIGHT @end diff --git a/iphone/Maps/Categories/UIFont+MapsMeFonts.h b/iphone/Maps/Categories/UIFont+MapsMeFonts.h index 5138151613..2b73e15cdc 100644 --- a/iphone/Maps/Categories/UIFont+MapsMeFonts.h +++ b/iphone/Maps/Categories/UIFont+MapsMeFonts.h @@ -1,55 +1,29 @@ NS_ASSUME_NONNULL_BEGIN @interface UIFont (MapsMeFonts) -+ (UIFont *)regular9; -+ (UIFont *)regular10; -+ (UIFont *)regular11; -+ (UIFont *)regular12; -+ (UIFont *)regular13; -+ (UIFont *)regular14; -+ (UIFont *)regular15; -+ (UIFont *)regular16; -+ (UIFont *)regular17; -+ (UIFont *)regular18; -+ (UIFont *)regular20; -+ (UIFont *)regular24; -+ (UIFont *)regular32; -+ (UIFont *)regular52; -+ (UIFont *)medium9; -+ (UIFont *)medium10; -+ (UIFont *)medium12; -+ (UIFont *)medium14; -+ (UIFont *)medium16; -+ (UIFont *)medium17; -+ (UIFont *)medium18; -+ (UIFont *)medium20; -+ (UIFont *)medium24; -+ (UIFont *)medium28; -+ (UIFont *)medium36; -+ (UIFont *)medium40; -+ (UIFont *)medium44; -+ (UIFont *)light10; -+ (UIFont *)light12; -+ (UIFont *)light16; -+ (UIFont *)light17; -+ (UIFont *)bold12; -+ (UIFont *)bold14; -+ (UIFont *)bold16; -+ (UIFont *)bold17; -+ (UIFont *)bold22; -+ (UIFont *)bold24; -+ (UIFont *)bold28; -+ (UIFont *)bold34; -+ (UIFont *)bold36; -+ (UIFont *)bold48; -+ (UIFont *)italic16; -+ (UIFont *)semibold12; -+ (UIFont *)semibold14; -+ (UIFont *)semibold15; -+ (UIFont *)semibold16; -+ (UIFont *)fredokaRegular25; - -+ (UIFont *)fontWithName:(NSString *)fontName; ++ (UIFont *)regular10 __attribute__ ((deprecated)); ++ (UIFont *)regular12 __attribute__ ((deprecated)); ++ (UIFont *)regular13 __attribute__ ((deprecated)); ++ (UIFont *)regular14 __attribute__ ((deprecated)); ++ (UIFont *)regular16 __attribute__ ((deprecated)); ++ (UIFont *)regular17 __attribute__ ((deprecated)); ++ (UIFont *)regular18 __attribute__ ((deprecated)); ++ (UIFont *)regular24 __attribute__ ((deprecated)); ++ (UIFont *)regular32 __attribute__ ((deprecated)); ++ (UIFont *)regular52 __attribute__ ((deprecated)); ++ (UIFont *)medium10 __attribute__ ((deprecated)); ++ (UIFont *)medium14 __attribute__ ((deprecated)); ++ (UIFont *)medium16 __attribute__ ((deprecated)); ++ (UIFont *)medium17 __attribute__ ((deprecated)); ++ (UIFont *)light12 __attribute__ ((deprecated)); ++ (UIFont *)bold12 __attribute__ ((deprecated)); ++ (UIFont *)bold14 __attribute__ ((deprecated)); ++ (UIFont *)bold16 __attribute__ ((deprecated)); ++ (UIFont *)bold17 __attribute__ ((deprecated)); ++ (UIFont *)bold24 __attribute__ ((deprecated)); ++ (UIFont *)bold28 __attribute__ ((deprecated)); ++ (UIFont *)bold36 __attribute__ ((deprecated)); ++ (UIFont *)semibold16 __attribute__ ((deprecated)); @end NS_ASSUME_NONNULL_END diff --git a/iphone/Maps/Categories/UIFont+MapsMeFonts.m b/iphone/Maps/Categories/UIFont+MapsMeFonts.m index 25d40b3536..89c32ec573 100644 --- a/iphone/Maps/Categories/UIFont+MapsMeFonts.m +++ b/iphone/Maps/Categories/UIFont+MapsMeFonts.m @@ -1,59 +1,27 @@ @implementation UIFont (MapsMeFonts) -+ (UIFont *)regular9 { return [UIFont systemFontOfSize:9]; } + (UIFont *)regular10 { return [UIFont systemFontOfSize:10]; } -+ (UIFont *)regular11 { return [UIFont systemFontOfSize:11]; } + (UIFont *)regular12 { return [UIFont systemFontOfSize:12]; } + (UIFont *)regular13 { return [UIFont systemFontOfSize:13]; } + (UIFont *)regular14 { return [UIFont systemFontOfSize:14]; } -+ (UIFont *)regular15 { return [UIFont systemFontOfSize:15]; } + (UIFont *)regular16 { return [UIFont systemFontOfSize:16]; } + (UIFont *)regular17 { return [UIFont systemFontOfSize:17]; } + (UIFont *)regular18 { return [UIFont systemFontOfSize:18]; } -+ (UIFont *)regular20 { return [UIFont systemFontOfSize:20]; } + (UIFont *)regular24 { return [UIFont systemFontOfSize:24]; } + (UIFont *)regular32 { return [UIFont systemFontOfSize:32]; } + (UIFont *)regular52 { return [UIFont systemFontOfSize:52]; } -+ (UIFont *)medium9 { return [UIFont systemFontOfSize:9 weight:UIFontWeightMedium]; } + (UIFont *)medium10 { return [UIFont systemFontOfSize:10 weight:UIFontWeightMedium]; } -+ (UIFont *)medium12 { return [UIFont systemFontOfSize:12 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]; } + (UIFont *)bold17 { return [UIFont boldSystemFontOfSize:17]; } -+ (UIFont *)bold22 { return [UIFont boldSystemFontOfSize:22]; } + (UIFont *)bold24 { return [UIFont boldSystemFontOfSize:24]; } + (UIFont *)bold28 { return [UIFont boldSystemFontOfSize:28]; } -+ (UIFont *)bold34 { return [UIFont boldSystemFontOfSize:34]; } + (UIFont *)bold36 { return [UIFont boldSystemFontOfSize:26]; } -+ (UIFont *)bold48 { return [UIFont boldSystemFontOfSize:48]; } -+ (UIFont *)italic16 { return [UIFont italicSystemFontOfSize:16]; } -+ (UIFont *)semibold12 { return [UIFont systemFontOfSize:14 weight:UIFontWeightSemibold]; } -+ (UIFont *)semibold14 { return [UIFont systemFontOfSize:14 weight:UIFontWeightSemibold]; } -+ (UIFont *)semibold15 { return [UIFont systemFontOfSize:15 weight:UIFontWeightSemibold]; } + (UIFont *)semibold16 { return [UIFont systemFontOfSize:16 weight:UIFontWeightSemibold]; } -+ (UIFont *)fredokaRegular25 { return [UIFont fontWithName:@"FredokaOne-Regular" size:25]; } - -+ (UIFont *)fontWithName:(NSString *)fontName -{ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Warc-performSelector-leaks" - return [[UIFont class] performSelector:NSSelectorFromString(fontName)]; -#pragma clang diagnostic pop -} @end diff --git a/iphone/Maps/Categories/UIKitCategories.h b/iphone/Maps/Categories/UIKitCategories.h index 6a79ddbfc9..25c89b596f 100644 --- a/iphone/Maps/Categories/UIKitCategories.h +++ b/iphone/Maps/Categories/UIKitCategories.h @@ -46,8 +46,6 @@ static inline CGFloat LengthCGPoint(CGPoint point) @interface UIView (Refresh) -- (void)mwm_refreshUI; - @end @interface UIApplication (URLs) diff --git a/iphone/Maps/Categories/UIKitCategories.m b/iphone/Maps/Categories/UIKitCategories.m index d7b1d1ce0c..74444fe021 100644 --- a/iphone/Maps/Categories/UIKitCategories.m +++ b/iphone/Maps/Categories/UIKitCategories.m @@ -103,133 +103,38 @@ @implementation UIView (Refresh) -- (void)mwm_refreshUI -{ - UIColor * opposite = self.backgroundColor.opposite; - if (opposite) - self.backgroundColor = opposite; - - for (UIView * v in self.subviews) - { - if ([v respondsToSelector:@selector(mwm_refreshUI)]) - [v mwm_refreshUI]; - } - [self setNeedsDisplay]; -} - @end @implementation UITableViewCell (Refresh) -- (void)mwm_refreshUI -{ - [super mwm_refreshUI]; - [self.selectedBackgroundView mwm_refreshUI]; -} - @end @implementation UINavigationBar (Refresh) -- (void)mwm_refreshUI -{ - UIColor * oppositeTint = self.tintColor.opposite; - UIColor * oppositeBar = self.barTintColor.opposite; - if (oppositeTint) - self.tintColor = oppositeTint; - if (oppositeBar) - self.barTintColor = oppositeBar; -} - @end @implementation UILabel (Refresh) -- (void)mwm_refreshUI -{ - [super mwm_refreshUI]; - UIColor * oppositeText = self.textColor.opposite; - if (oppositeText) - self.textColor = oppositeText; -} - @end @implementation UISlider (Refresh) -- (void)mwm_refreshUI -{ - UIColor * opposite = self.minimumTrackTintColor.opposite; - if (opposite) - self.minimumTrackTintColor = opposite; -} - @end @implementation UISwitch (Refresh) -- (void)mwm_refreshUI -{ - UIColor * opposite = self.onTintColor.opposite; - if (opposite) - self.onTintColor = opposite; -} - @end @implementation UIButton (Refresh) -- (void)mwm_refreshUI -{ - UIColor * oppositeNormal = [self titleColorForState:UIControlStateNormal].opposite; - UIColor * oppositeSelected = [self titleColorForState:UIControlStateSelected].opposite; - UIColor * oppositeHightlighted = [self titleColorForState:UIControlStateHighlighted].opposite; - UIColor * oppositeDisabled = [self titleColorForState:UIControlStateDisabled].opposite; - if (oppositeNormal) - [self setTitleColor:oppositeNormal forState:UIControlStateNormal]; - if (oppositeSelected) - [self setTitleColor:oppositeSelected forState:UIControlStateSelected]; - if (oppositeHightlighted) - [self setTitleColor:oppositeHightlighted forState:UIControlStateHighlighted]; - if (oppositeDisabled) - [self setTitleColor:oppositeDisabled forState:UIControlStateDisabled]; - - NSString * backgroundColorName = [self backgroundColorName]; - NSString * backgroundHighlightedColorName = [self backgroundHighlightedColorName]; - NSString * backgroundSelectedColorName = [self backgroundSelectedColorName]; - if (backgroundColorName) - [self setBackgroundColorName:backgroundColorName]; - if (backgroundHighlightedColorName) - [self setBackgroundHighlightedColorName:backgroundHighlightedColorName]; - if (backgroundSelectedColorName) - [self setBackgroundSelectedColorName:backgroundSelectedColorName]; -} - @end @implementation UITextView (Refresh) -- (void)mwm_refreshUI -{ - [super mwm_refreshUI]; - UIColor * oppositeText = self.textColor.opposite; - UIColor * oppositeTint = self.tintColor.opposite; - if (oppositeText) - self.textColor = oppositeText; - if (oppositeTint) - self.tintColor = oppositeTint; -} - @end @implementation UIImageView (Refresh) -- (void)mwm_refreshUI -{ - [super mwm_refreshUI]; - [self changeColoringToOpposite]; -} - @end @implementation SolidTouchImageView diff --git a/iphone/Maps/Categories/UILabel+RuntimeAttributes.m b/iphone/Maps/Categories/UILabel+RuntimeAttributes.m index 8ac440368a..789b443228 100644 --- a/iphone/Maps/Categories/UILabel+RuntimeAttributes.m +++ b/iphone/Maps/Categories/UILabel+RuntimeAttributes.m @@ -14,14 +14,4 @@ return L(text); } -- (void)setFontName:(NSString *)fontName -{ - self.font = [UIFont fontWithName:fontName]; -} - -- (void)setColorName:(NSString *)colorName -{ - self.textColor = [UIColor colorWithName:colorName]; -} - @end diff --git a/iphone/Maps/Categories/UISwitch+RuntimeAttributes.h b/iphone/Maps/Categories/UISwitch+RuntimeAttributes.h deleted file mode 100644 index a0e62132c7..0000000000 --- a/iphone/Maps/Categories/UISwitch+RuntimeAttributes.h +++ /dev/null @@ -1,3 +0,0 @@ -@interface UISwitch (RuntimeAttributes) - -@end diff --git a/iphone/Maps/Categories/UISwitch+RuntimeAttributes.m b/iphone/Maps/Categories/UISwitch+RuntimeAttributes.m deleted file mode 100644 index 15f397975c..0000000000 --- a/iphone/Maps/Categories/UISwitch+RuntimeAttributes.m +++ /dev/null @@ -1,10 +0,0 @@ -#import "UISwitch+RuntimeAttributes.h" - -@implementation UISwitch (RuntimeAttributes) - -- (void)setOnTintColorName:(NSString *)colorName -{ - self.onTintColor = [UIColor colorWithName:colorName]; -} - -@end diff --git a/iphone/Maps/Categories/UITextField+RuntimeAttributes.m b/iphone/Maps/Categories/UITextField+RuntimeAttributes.m index 50d2d78ccb..95f760572b 100644 --- a/iphone/Maps/Categories/UITextField+RuntimeAttributes.m +++ b/iphone/Maps/Categories/UITextField+RuntimeAttributes.m @@ -15,16 +15,6 @@ return L(placeholder); } -- (void)setFontName:(NSString *)fontName -{ - self.font = [UIFont fontWithName:fontName]; -} - -- (void)setColorName:(NSString *)colorName -{ - self.textColor = [UIColor colorWithName:colorName]; -} - - (void)setValidator:(MWMInputValidator *)validator { objc_setAssociatedObject(self, @selector(validator), validator, OBJC_ASSOCIATION_RETAIN_NONATOMIC); diff --git a/iphone/Maps/Categories/UITextView+RuntimeAttributes.m b/iphone/Maps/Categories/UITextView+RuntimeAttributes.m index 00a9ce7074..3ecd99a299 100644 --- a/iphone/Maps/Categories/UITextView+RuntimeAttributes.m +++ b/iphone/Maps/Categories/UITextView+RuntimeAttributes.m @@ -11,22 +11,6 @@ { return L(self.text); } - -- (void)setFontName:(NSString *)fontName -{ - self.font = [UIFont fontWithName:fontName]; -} - -- (void)setColorName:(NSString *)colorName -{ - self.textColor = [UIColor colorWithName:colorName]; -} - -- (void)setTintColorName:(NSString *)colorName -{ - self.tintColor = [UIColor colorWithName:colorName]; -} - @end @implementation MWMTextView (RuntimeAttributes) @@ -40,10 +24,4 @@ { return L(self.placeholder); } - -- (void)setPlaceholderColorName:(NSString *)placeholderColorName -{ - self.placeholderView.textColor = [UIColor colorWithName:placeholderColorName]; -} - @end diff --git a/iphone/Maps/Categories/UIView+RuntimeAttributes.h b/iphone/Maps/Categories/UIView+RuntimeAttributes.h deleted file mode 100644 index fb06047f55..0000000000 --- a/iphone/Maps/Categories/UIView+RuntimeAttributes.h +++ /dev/null @@ -1,5 +0,0 @@ -#import - -@interface UIView (RuntimeAttributes) - -@end diff --git a/iphone/Maps/Categories/UIView+RuntimeAttributes.m b/iphone/Maps/Categories/UIView+RuntimeAttributes.m deleted file mode 100644 index c3309fd964..0000000000 --- a/iphone/Maps/Categories/UIView+RuntimeAttributes.m +++ /dev/null @@ -1,17 +0,0 @@ -#import "UIView+RuntimeAttributes.h" - -@implementation UIView (RuntimeAttributes) - -- (void)setBackgroundColorName:(NSString *)colorName { - self.backgroundColor = [UIColor colorWithName:colorName]; -} - -- (void)setTintColorName:(NSString *)colorName { - self.tintColor = [UIColor colorWithName:colorName]; -} - -- (void)setBorderColorName:(NSString *)colorName { - self.layer.borderColor = [UIColor colorWithName:colorName].CGColor; -} - -@end diff --git a/iphone/Maps/Core/Theme/AdsStyleSheet.swift b/iphone/Maps/Core/Theme/AdsStyleSheet.swift new file mode 100644 index 0000000000..c95cb95641 --- /dev/null +++ b/iphone/Maps/Core/Theme/AdsStyleSheet.swift @@ -0,0 +1,48 @@ +class AdsStyleSheet: IStyleSheet { + static func register(theme: Theme, colors: IColors, fonts: IFonts) { + theme.add(styleName: "NativeAdView") { (s) -> (Void) in + s.borderWidth = 2 + s.borderColor = UIColor.init(0, 0, 0, alpha12); + s.backgroundColor = colors.bannerBackground + } + + theme.add(styleName: "AdBannerPrivacyImage") { (s) -> (Void) in + s.cornerRadius = 4 + s.clip = true + } + + theme.add(styleName: "AdBannerButton") { (s) -> (Void) in + s.font = fonts.medium14 + s.backgroundColor = colors.bannerButtonBackground + s.fontColor = colors.blackSecondaryText + s.clip = true + s.cornerRadius = 8 + } + + theme.add(styleName: "AdCallToActionButton", from: "AdBannerButton") { (s) -> (Void) in + s.cornerRadius = 10 + } + + theme.add(styleName: "RemoveAdsOptionsButton") { (s) -> (Void) in + s.font = fonts.regular12 + s.fontColor = colors.blackSecondaryText + s.fontColorHighlighted = colors.blackHintText + s.backgroundColor = colors.border + s.backgroundColorSelected = colors.blackDividers + } + + theme.add(styleName: "RemoveAdsOptionsView") { (s) -> (Void) in + s.borderColor = colors.blackDividers + s.borderWidth = 1 + s.backgroundColor = colors.blackDividers + s.cornerRadius = 9 + } + + theme.add(styleName: "AdsIconImage") { (s) -> (Void) in + s.cornerRadius = 4 + s.clip = true + s.borderWidth = 1 + s.borderColor = colors.blackDividers + } + } +} diff --git a/iphone/Maps/Core/Theme/AuthStyleSheet.swift b/iphone/Maps/Core/Theme/AuthStyleSheet.swift new file mode 100644 index 0000000000..f7e4eb6f64 --- /dev/null +++ b/iphone/Maps/Core/Theme/AuthStyleSheet.swift @@ -0,0 +1,28 @@ +class AuthStyleSheet: IStyleSheet { + static func register(theme: Theme, colors: IColors, fonts: IFonts) { + theme.add(styleName: "GoogleButton") { (s) -> (Void) in + s.cornerRadius = 8 + s.borderWidth = 1 + s.borderColor = colors.blackDividers + s.clip = true + s.fontColor = colors.blackPrimaryText + s.fontColorDisabled = colors.blackSecondaryText + s.font = fonts.bold14 + } + + theme.add(styleName: "FacebookButton") { (s) -> (Void) in + s.cornerRadius = 8 + s.clip = true + s.font = fonts.bold14 + s.backgroundColor = colors.facebookButtonBackground + s.backgroundColorDisabled = colors.facebookButtonBackgroundDisabled + } + + theme.add(styleName: "OsmSocialLoginButton") { (s) -> (Void) in + s.font = fonts.regular17 + s.cornerRadius = 8 + s.borderWidth = 1 + s.borderColor = colors.blackDividers + } + } +} diff --git a/iphone/Maps/Core/Theme/BookmarksStyleSheet.swift b/iphone/Maps/Core/Theme/BookmarksStyleSheet.swift new file mode 100644 index 0000000000..9233c4f170 --- /dev/null +++ b/iphone/Maps/Core/Theme/BookmarksStyleSheet.swift @@ -0,0 +1,26 @@ +import Foundation + +class BookmarksStyleSheet: IStyleSheet { + static func register(theme: Theme, colors: IColors, fonts: IFonts) { + theme.add(styleName: "BookmarksCategoryTextView") { (s) -> (Void) in + s.font = fonts.regular16 + s.fontColor = colors.blackPrimaryText + s.textContainerInset = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0) + } + + theme.add(styleName: "BookmarksCategoryDeleteButton") { (s) -> (Void) in + s.font = fonts.regular17 + s.fontColor = colors.red + s.fontColorDisabled = colors.blackHintText + } + + theme.add(styleName: "BookmarksActionCreateIcon") { (s) -> (Void) in + s.tintColor = colors.linkBlue + } + + theme.add(styleName: "BookmarkSharingLicense", from: "TermsOfUseLinkText") { (s) -> (Void) in + s.fontColor = colors.blackSecondaryText + s.font = fonts.regular14 + } + } +} diff --git a/iphone/Maps/Core/Theme/Colors.swift b/iphone/Maps/Core/Theme/Colors.swift new file mode 100644 index 0000000000..71b1a94d6a --- /dev/null +++ b/iphone/Maps/Core/Theme/Colors.swift @@ -0,0 +1,129 @@ +class DayColors: IColors { + var clear = UIColor.clear + var primaryDark = UIColor(24, 128, 68, alpha100) + var primary = UIColor(32, 152, 82, alpha100) + var secondary = UIColor(45, 137, 83, alpha100) + // Light green color + var primaryLight = UIColor(36, 180, 98, alpha100) + var menuBackground = UIColor(255, 255, 255, alpha80) + var downloadBadgeBackground = UIColor(255, 55, 35, alpha100) + // Background color && press color + var pressBackground = UIColor(245, 245, 245, alpha100) + // Red color (use for status closed in place page) + var red = UIColor(230, 15, 35, alpha100) + var errorPink = UIColor(246, 60, 51, alpha12) + // Orange color (use for status 15 min in place page) + var orange = UIColor(255, 120, 5, alpha100) + // Blue color (use for links and phone numbers) + var linkBlue = UIColor(30, 150, 240, alpha100) + var linkBlueHighlighted = UIColor(30, 150, 240, alpha30) + var linkBlueDark = UIColor(25, 135, 215, alpha100) + var buttonRed = UIColor(244, 67, 67, alpha100) + var buttonRedHighlighted = UIColor(183, 28, 28, alpha100) + var blackPrimaryText = UIColor(0, 0, 0, alpha87) + var blackSecondaryText = UIColor(0, 0, 0, alpha54) + var blackHintText = UIColor(0, 0, 0, alpha26) + var blackDividers = UIColor(0, 0, 0, alpha12) + var white = UIColor(255, 255, 255, alpha100) + var whitePrimaryText = UIColor(255, 255, 255, alpha87); + var whitePrimaryTextHighlighted = UIColor(255, 255, 255, alpha30); + var whiteSecondaryText = UIColor(255, 255, 255, alpha54) + var whiteHintText = UIColor(255, 255, 255, alpha30) + var buttonDisabledBlueText = UIColor(3, 122, 255, alpha26) + var alertBackground = UIColor(255, 255, 255, alpha90) + var blackOpaque = UIColor(0, 0, 0, alpha04) + var toastBackground = UIColor(255, 255, 255, alpha87) + var statusBarBackground = UIColor(255, 255, 255, alpha36) + var bannerBackground = UIColor(249, 251, 231, alpha100) + var border = UIColor(0, 0, 0, alpha04) + var discountBackground = UIColor(240, 100, 60, alpha100) + var discountText = UIColor(60, 64, 68, alpha100) + var bookmarkSubscriptionBackground = UIColor(240, 252, 255, alpha100) + var bookmarkSubscriptionScrollBackground = UIColor(137, 217, 255, alpha100) + var bookmarkSubscriptionFooterBackground = UIColor(47, 58, 73, alpha100) + var bookingBackground = UIColor(25, 69, 125, alpha100) + var opentableBackground = UIColor(218, 55, 67, alpha100) + var transparentGreen = UIColor(233, 244, 233, alpha26) + var ratingRed = UIColor(229, 57, 53, alpha100) + var ratingOrange = UIColor(244, 81, 30, alpha100) + var ratingYellow = UIColor(245, 176, 39, alpha100) + var ratingLightGreen = UIColor(124, 179, 66, alpha100) + var ratingGreen = UIColor(67, 160, 71, alpha100) + var bannerButtonBackground = UIColor(0, 0, 0, alpha12) + var facebookButtonBackground = UIColor(59, 89, 152, alpha100); + var facebookButtonBackgroundDisabled = UIColor(59, 89, 152, alpha70); + var allPassSubscriptionTitle = UIColor(255, 255, 255, alpha40) + var allPassSubscriptionDescription = UIColor(255, 255, 255, alpha100) + var allPassSubscriptionSubTitle = UIColor(30, 150, 240, alpha100) + var allPassSubscriptionMonthlyBackground = UIColor(224, 224, 224, alpha80) + var allPassSubscriptionMonthlyTitle = UIColor(0, 0, 0, alpha87) + var allPassSubscriptionDiscountBackground = UIColor(245, 210, 12, alpha100) + var allPassSubscriptionTermsTitle = UIColor(255, 255, 255, alpha70) + var fadeBackground = UIColor(0, 0, 0, alpha80) + var blackStatusBarBackground = UIColor(0, 0, 0, alpha80) +} + +class NightColors: IColors { + var clear = UIColor.clear + var primaryDark = UIColor(25, 30, 35, alpha100) + var primary = UIColor(45, 50, 55, alpha100) + var secondary = UIColor(0x25, 0x28, 0x2b, alpha100) + // Light green color + var primaryLight = UIColor(65, 70, 75, alpha100) + var menuBackground = UIColor(45, 50, 55, alpha80) + var downloadBadgeBackground = UIColor(230, 70, 60, alpha100) + // Background color && press color + var pressBackground = UIColor(50, 54, 58, alpha100) + // Red color (use for status closed in place page) + var red = UIColor(230, 70, 60, alpha100) + var errorPink = UIColor(246, 60, 51, alpha26) + // Orange color (use for status 15 min in place page) + var orange = UIColor(250, 190, 10, alpha100) + // Blue color (use for links and phone numbers) + var linkBlue = UIColor(80, 195, 240, alpha100) + var linkBlueHighlighted = UIColor(60, 155, 190, alpha30) + var linkBlueDark = UIColor(75, 185, 230, alpha100) + var buttonRed = UIColor(244, 67, 67, alpha100) + var buttonRedHighlighted = UIColor(183, 28, 28, alpha100) + var blackPrimaryText = UIColor(255, 255, 255, alpha90) + var blackSecondaryText = UIColor(255, 255, 255, alpha70) + var blackHintText = UIColor(255, 255, 255, alpha30) + var blackDividers = UIColor(255, 255, 255, alpha12) + var white = UIColor(60, 64, 68, alpha100) + var whitePrimaryText = UIColor(255, 255, 255, alpha87) + var whitePrimaryTextHighlighted = UIColor(255, 255, 255, alpha30) + var whiteSecondaryText = UIColor(0, 0, 0, alpha70) + var whiteHintText = UIColor(0, 0, 0, alpha26) + var buttonDisabledBlueText = UIColor(255, 230, 140, alpha30) + var alertBackground = UIColor(60, 64, 68, alpha90) + var blackOpaque = UIColor(255, 255, 255, alpha04) + var toastBackground = UIColor(0, 0, 0, alpha87) + var statusBarBackground = UIColor(0, 0, 0, alpha32) + var bannerBackground = UIColor(71, 75, 79, alpha100) + var border = UIColor(255, 255, 255, alpha04) + var discountBackground = UIColor(240, 100, 60, alpha100) + var discountText = UIColor(60, 64, 68, alpha100) + var bookmarkSubscriptionBackground = UIColor(60, 64, 68, alpha100) + var bookmarkSubscriptionScrollBackground = UIColor(137, 217, 255, alpha100) + var bookmarkSubscriptionFooterBackground = UIColor(47, 58, 73, alpha100) + var bookingBackground = UIColor(25, 69, 125, alpha100) + var opentableBackground = UIColor(218, 55, 67, alpha100) + var transparentGreen = UIColor(233, 244, 233, alpha26) + var ratingRed = UIColor(229, 57, 53, alpha100) + var ratingOrange = UIColor(244, 81, 30, alpha100) + var ratingYellow = UIColor(245, 176, 39, alpha100) + var ratingLightGreen = UIColor(124, 179, 66, alpha100) + var ratingGreen = UIColor(67, 160, 71, alpha100) + var bannerButtonBackground = UIColor(255, 255, 255, alpha12) + var facebookButtonBackground = UIColor(59, 89, 152, alpha100); + var facebookButtonBackgroundDisabled = UIColor(59, 89, 152, alpha70); + var allPassSubscriptionTitle = UIColor(255, 255, 255, alpha40) + var allPassSubscriptionDescription = UIColor(255, 255, 255, alpha100) + var allPassSubscriptionSubTitle = UIColor(30, 150, 240, alpha100) + var allPassSubscriptionMonthlyBackground = UIColor(224, 224, 224, alpha80) + var allPassSubscriptionMonthlyTitle = UIColor(0, 0, 0, alpha87) + var allPassSubscriptionDiscountBackground = UIColor(245, 210, 12, alpha100) + var allPassSubscriptionTermsTitle = UIColor(255, 255, 255, alpha70) + var fadeBackground = UIColor(0, 0, 0, alpha80) + var blackStatusBarBackground = UIColor(0, 0, 0, alpha80) +} diff --git a/iphone/Maps/Core/Theme/Components/IColors.swift b/iphone/Maps/Core/Theme/Components/IColors.swift new file mode 100644 index 0000000000..553c941d73 --- /dev/null +++ b/iphone/Maps/Core/Theme/Components/IColors.swift @@ -0,0 +1,74 @@ +let alpha04: CGFloat = 0.04 +let alpha12: CGFloat = 0.12 +let alpha20: CGFloat = 0.20 +let alpha26: CGFloat = 0.26 +let alpha30: CGFloat = 0.3 +let alpha32: CGFloat = 0.32 +let alpha36: CGFloat = 0.36 +let alpha40: CGFloat = 0.4 +let alpha54: CGFloat = 0.54 +let alpha70: CGFloat = 0.7 +let alpha80: CGFloat = 0.8 +let alpha87: CGFloat = 0.87 +let alpha90: CGFloat = 0.9 +let alpha100: CGFloat = 1.0 + +@objc protocol IColors { + var clear: UIColor { get } + var primaryDark: UIColor { get } + var primary: UIColor { get } + var secondary: UIColor { get } + var primaryLight: UIColor { get } + var menuBackground: UIColor { get } + var downloadBadgeBackground: UIColor { get } + var pressBackground: UIColor { get } + var red: UIColor { get } + var errorPink: UIColor { get } + var orange: UIColor { get } + var linkBlue: UIColor { get } + var linkBlueHighlighted: UIColor { get } + var linkBlueDark: UIColor { get } + var buttonRed: UIColor { get } + var buttonRedHighlighted: UIColor { get } + var blackPrimaryText: UIColor { get } + var blackSecondaryText: UIColor { get } + var blackHintText: UIColor { get } + var blackDividers: UIColor { get } + var white: UIColor { get } + var whitePrimaryText: UIColor { get } + var whitePrimaryTextHighlighted: UIColor { get } + var whiteSecondaryText: UIColor { get } + var whiteHintText: UIColor { get } + var buttonDisabledBlueText: UIColor { get } + var alertBackground: UIColor { get } + var blackOpaque: UIColor { get } + var toastBackground: UIColor { get } + var statusBarBackground: UIColor { get } + var bannerBackground: UIColor { get } + var border: UIColor { get } + var discountBackground: UIColor { get } + var discountText: UIColor { get } + var bookmarkSubscriptionBackground: UIColor { get } + var bookmarkSubscriptionScrollBackground: UIColor { get } + var bookmarkSubscriptionFooterBackground: UIColor { get } + var bookingBackground: UIColor { get } + var opentableBackground: UIColor { get } + var transparentGreen: UIColor { get } + var ratingRed: UIColor { get } + var ratingOrange: UIColor { get } + var ratingYellow: UIColor { get } + var ratingLightGreen: UIColor { get } + var ratingGreen: UIColor { get } + var bannerButtonBackground: UIColor { get } + var facebookButtonBackground: UIColor { get } + var facebookButtonBackgroundDisabled: UIColor { get } + var allPassSubscriptionTitle: UIColor { get } + var allPassSubscriptionDescription: UIColor { get } + var allPassSubscriptionSubTitle: UIColor { get } + var allPassSubscriptionMonthlyBackground: UIColor { get } + var allPassSubscriptionMonthlyTitle: UIColor { get } + var allPassSubscriptionDiscountBackground: UIColor { get } + var allPassSubscriptionTermsTitle: UIColor { get } + var fadeBackground: UIColor { get } + var blackStatusBarBackground: UIColor { get } +} diff --git a/iphone/Maps/Core/Theme/Components/IFonts.swift b/iphone/Maps/Core/Theme/Components/IFonts.swift new file mode 100644 index 0000000000..49eab8bf5a --- /dev/null +++ b/iphone/Maps/Core/Theme/Components/IFonts.swift @@ -0,0 +1,50 @@ +@objc protocol IFonts { + var regular9: UIFont { get } + var regular10: UIFont { get } + + var regular11: UIFont { get } + var regular12: UIFont { get } + var regular13: UIFont { get } + var regular14: UIFont { get } + var regular15: UIFont { get } + var regular16: UIFont { get } + var regular17: UIFont { get } + var regular18: UIFont { get } + var regular20: UIFont { get } + var regular24: UIFont { get } + var regular32: UIFont { get } + var regular52: UIFont { get } + var medium9: UIFont { get } + var medium10: UIFont { get } + var medium12: UIFont { get } + var medium14: UIFont { get } + var medium16: UIFont { get } + var medium17: UIFont { get } + var medium18: UIFont { get } + var medium20: UIFont { get } + var medium24: UIFont { get } + var medium28: UIFont { get } + var medium36: UIFont { get } + var medium40: UIFont { get } + var medium44: UIFont { get } + var light10: UIFont { get } + var light12: UIFont { get } + var light16: UIFont { get } + var light17: UIFont { get } + var bold12: UIFont { get } + var bold14: UIFont { get } + var bold16: UIFont { get } + var bold17: UIFont { get } + var bold22: UIFont { get } + var bold24: UIFont { get } + var bold28: UIFont { get } + var bold34: UIFont { get } + var bold36: UIFont { get } + var bold48: UIFont { get } + var italic16: UIFont { get } + var semibold12: UIFont { get } + var semibold14: UIFont { get } + var semibold15: UIFont { get } + var semibold16: UIFont { get } + var fredokaRegular25: UIFont { get } +} diff --git a/iphone/Maps/Core/Theme/Core/IStyleSheet.swift b/iphone/Maps/Core/Theme/Core/IStyleSheet.swift new file mode 100644 index 0000000000..b0a988d761 --- /dev/null +++ b/iphone/Maps/Core/Theme/Core/IStyleSheet.swift @@ -0,0 +1,3 @@ +protocol IStyleSheet: class { + static func register(theme: Theme, colors: IColors, fonts: IFonts) +} diff --git a/iphone/Maps/Core/Theme/Core/Style.swift b/iphone/Maps/Core/Theme/Core/Style.swift new file mode 100644 index 0000000000..bb761ed6ae --- /dev/null +++ b/iphone/Maps/Core/Theme/Core/Style.swift @@ -0,0 +1,280 @@ +class Style: ExpressibleByDictionaryLiteral { + enum Parameter: Hashable{ + case backgroundColor + case borderColor + case borderWidth + case cornerRadius + case shadowColor + case shadowOpacity + case shadowOffset + case shadowRadius + case clip + case round + + case font + case fontColor + case fontDetailed + case fontColorDetailed + case tintColor + case tintColorDisabled + case onTintColor + case offTintColor + case image + case mwmImage + case color + case attributes + case linkAttributes + + case backgroundImage + case backgroundColorSelected + case backgroundColorHighlighted + case backgroundColorDisabled + case fontColorSelected + case fontColorHighlighted + case fontColorDisabled + case barTintColor + case shadowImage + case textAlignment + case textContainerInset + case separatorColor + case pageIndicatorTintColor + case currentPageIndicatorTintColor + + case coloring + case colors + case images + case unknown + } + + typealias Key = Parameter + typealias Value = Any? + + var params:[Key: Value] = [:] + + required init(dictionaryLiteral elements: (Style.Parameter, Any?)...) { + for (key, value) in elements { + params[key] = value + } + } + + subscript(keyname: Key) -> Value { + get { return self.params[keyname] != nil ? self.params[keyname]! : nil } + } + + func append(_ style: Style){ + self.params.merge(style.params) { (a, b) -> Style.Value in + return b + } + } + + func append(_ styles: [Style]){ + styles.forEach { (style) in + self.params.merge(style.params) { (a, b) -> Style.Value in + return b + } + } + } +} + + +extension Style { + var backgroundColor: UIColor? { + get { return self[.backgroundColor] as? UIColor } + set { self.params[.backgroundColor] = newValue } + } + + var borderColor: UIColor? { + get { return self[.borderColor] as? UIColor } + set { self.params[.borderColor] = newValue } + } + + var borderWidth: CGFloat? { + get { return self[.borderWidth] as? CGFloat } + set { self.params[.borderWidth] = newValue } + } + + var cornerRadius: CGFloat? { + get { return self[.cornerRadius] as? CGFloat } + set { self.params[.cornerRadius] = newValue } + } + + var shadowColor: UIColor? { + get { return self[.shadowColor] as? UIColor } + set { self.params[.shadowColor] = newValue } + } + + var shadowOpacity: Float? { + get { return self[.shadowOpacity] as? Float } + set { self.params[.shadowOpacity] = newValue } + } + + var shadowOffset: CGSize? { + get { return self[.shadowOffset] as? CGSize } + set { self.params[.shadowOffset] = newValue } + } + + var shadowRadius: CGFloat? { + get { return self[.shadowRadius] as? CGFloat } + set { self.params[.shadowRadius] = newValue } + } + + var clip: Bool? { + get { return self[.clip] as? Bool } + set { self.params[.clip] = newValue } + } + + var round: Bool? { + get { return self[.round] as? Bool } + set { self.params[.round] = newValue } + } + + var font: UIFont? { + get { return self[.font] as? UIFont } + set { self.params[.font] = newValue } + } + + var fontColor: UIColor? { + get { return self[.fontColor] as? UIColor } + set { self.params[.fontColor] = newValue } + } + + var fontDetailed: UIFont? { + get { return self[.fontDetailed] as? UIFont } + set { self.params[.fontDetailed] = newValue } + } + + var fontColorDetailed: UIColor? { + get { return self[.fontColorDetailed] as? UIColor } + set { self.params[.fontColorDetailed] = newValue } + } + + var tintColor: UIColor? { + get { return self[.tintColor] as? UIColor } + set { self.params[.tintColor] = newValue } + } + + var tintColorDisabled: UIColor? { + get { return self[.tintColorDisabled] as? UIColor } + set { self.params[.tintColorDisabled] = newValue } + } + + var onTintColor: UIColor? { + get { return self[.onTintColor] as? UIColor } + set { self.params[.onTintColor] = newValue } + } + + var offTintColor: UIColor? { + get { return self[.offTintColor] as? UIColor } + set { self.params[.offTintColor] = newValue } + } + + var image: String? { + get { return self[.image] as? String } + set { self.params[.image] = newValue } + } + + var mwmImage: String? { + get { return self[.mwmImage] as? String } + set { self.params[.mwmImage] = newValue } + } + + var color: UIColor? { + get { return self[.color] as? UIColor } + set { self.params[.color] = newValue } + } + + var attributes: [NSAttributedString.Key : Any]? { + get { return self[.attributes] as? [NSAttributedString.Key : Any] } + set { self.params[.attributes] = newValue } + } + + var linkAttributes: [NSAttributedString.Key : Any]? { + get { return self[.linkAttributes] as? [NSAttributedString.Key : Any] } + set { self.params[.linkAttributes] = newValue } + } + + var backgroundImage: UIImage? { + get { return self[.backgroundImage] as? UIImage } + set { self.params[.backgroundImage] = newValue } + } + + var barTintColor: UIColor? { + get { return self[.barTintColor] as? UIColor } + set { self.params[.barTintColor] = newValue } + } + + var backgroundColorSelected: UIColor? { + get { return self[.backgroundColorSelected] as? UIColor } + set { self.params[.backgroundColorSelected] = newValue } + } + + var backgroundColorHighlighted: UIColor? { + get { return self[.backgroundColorHighlighted] as? UIColor } + set { self.params[.backgroundColorHighlighted] = newValue } + } + + var backgroundColorDisabled: UIColor? { + get { return self[.backgroundColorDisabled] as? UIColor } + set { self.params[.backgroundColorDisabled] = newValue } + } + + var fontColorSelected: UIColor? { + get { return self[.fontColorSelected] as? UIColor } + set { self.params[.fontColorSelected] = newValue } + } + + var fontColorHighlighted: UIColor? { + get { return self[.fontColorHighlighted] as? UIColor } + set { self.params[.fontColorHighlighted] = newValue } + } + + var fontColorDisabled: UIColor? { + get { return self[.fontColorDisabled] as? UIColor } + set { self.params[.fontColorDisabled] = newValue } + } + + var shadowImage: UIImage? { + get { return self[.shadowImage] as? UIImage } + set { self.params[.shadowImage] = newValue } + } + + var textAlignment: NSTextAlignment? { + get { return self[.textAlignment] as? NSTextAlignment } + set { self.params[.textAlignment] = newValue } + } + + var textContainerInset: UIEdgeInsets? { + get { return self[.textContainerInset] as? UIEdgeInsets } + set { self.params[.textContainerInset] = newValue } + } + + var separatorColor: UIColor? { + get { return self[.separatorColor] as? UIColor } + set { self.params[.separatorColor] = newValue } + } + + var pageIndicatorTintColor: UIColor? { + get { return self[.pageIndicatorTintColor] as? UIColor } + set { self.params[.pageIndicatorTintColor] = newValue } + } + + var currentPageIndicatorTintColor: UIColor? { + get { return self[.currentPageIndicatorTintColor] as? UIColor } + set { self.params[.currentPageIndicatorTintColor] = newValue } + } + + var colors: [UIColor]? { + get { return self[.colors] as? [UIColor] } + set { self.params[.colors] = newValue } + } + + var images: [String]? { + get { return self[.images] as? [String] } + set { self.params[.images] = newValue } + } + + var coloring: MWMButtonColoring? { + get { return self[.coloring] as? MWMButtonColoring } + set { self.params[.coloring] = newValue } + } +} diff --git a/iphone/Maps/Core/Theme/Core/StyleManager.swift b/iphone/Maps/Core/Theme/Core/StyleManager.swift new file mode 100644 index 0000000000..2b91739180 --- /dev/null +++ b/iphone/Maps/Core/Theme/Core/StyleManager.swift @@ -0,0 +1,84 @@ +@objc protocol ThemeListener { + @objc func applyTheme() +} + +@objc class StyleManager: NSObject { + private struct Weak { + weak var listener: ThemeListener? + } + private static var _instance: StyleManager? + @objc private(set) var theme: Theme? + private var listeners: [Weak] = [] + + func setTheme (_ theme: Theme) { + self.theme = theme; + update() + } + + func hasTheme () -> Bool { + return theme != nil + } + + @objc class func instance() -> StyleManager{ + if StyleManager._instance == nil { + SwizzleStyle.addSwizzle(); + StyleManager._instance = StyleManager() + } + return StyleManager._instance! + } + + func update (){ + for window in UIApplication.shared.windows { + updateView(window.rootViewController?.view) + } + + let appDelegate = UIApplication.shared.delegate as! MapsAppDelegate + if let vc = appDelegate.window.rootViewController?.presentedViewController { + vc.applyTheme() + updateView(vc.view) + } else if let vcs = appDelegate.window.rootViewController?.children { + for vc in vcs { + vc.applyTheme() + } + } + + for container in listeners { + if let listener = container.listener { + listener.applyTheme() + } + } + } + + private func updateView(_ view: UIView?) { + guard let view = view else { + return + } + view.isStyleApplied = false + for subview in view.subviews { + self.updateView(subview) + } + view.applyTheme() + view.isStyleApplied = true; + } + + func getStyle(_ styleName: String) -> [Style]{ + return theme?.get(styleName) ?? [Style]() + } + + @objc func addListener(_ themeListener: ThemeListener) { + if theme != nil { + themeListener.applyTheme() + } + if listeners.contains(where: { (container) -> Bool in + return themeListener === container.listener + }) == false { + listeners.append(Weak(listener: themeListener)) + } + } + + @objc func removeListener(_ themeListener: ThemeListener) { + listeners.removeAll { (container) -> Bool in + return container.listener === themeListener + } + } +} diff --git a/iphone/Maps/Core/Theme/Core/Theme.swift b/iphone/Maps/Core/Theme/Core/Theme.swift new file mode 100644 index 0000000000..dc77c4cd3a --- /dev/null +++ b/iphone/Maps/Core/Theme/Core/Theme.swift @@ -0,0 +1,85 @@ +@objc class Theme: NSObject { + enum ThemeType { + case dark + case light + } + typealias StyleName = String + typealias Resolver = ((Style) -> (Void)) + + @objc let colors: IColors + @objc let fonts: IFonts + private var themeType: ThemeType + private var components: [StyleName: Style] = [:] + private var resolvers: [StyleName: Resolver] = [:] + private var dependencies: [StyleName: StyleName] = [:] + + init (type: ThemeType, colors: IColors, fonts: IFonts) { + self.colors = colors + self.fonts = fonts + self.themeType = type + super.init() + self.register() + } + + func registerStyleSheet (_ type: U.Type) { + U.register(theme: self, colors: colors, fonts: fonts) + } + + + func add(styleName: StyleName, + _ resolver:@escaping Resolver) { + resolvers[styleName] = resolver + } + + func add(styleName: StyleName, + from: StyleName, + _ resolver:@escaping Resolver) { + resolvers[styleName] = resolver + dependencies[styleName] = from + } + + func add(styleName: StyleName, + forType: ThemeType, + _ resolver:@escaping Resolver) { + guard themeType == forType else { + return + } + resolvers[styleName] = resolver + } + + func add(styleName: StyleName, + from: StyleName, + forType: ThemeType, + _ resolver:@escaping Resolver) { + guard themeType == forType else { + return + } + resolvers[styleName] = resolver + dependencies[styleName] = from + } + + func get(_ styleName: StyleName) -> [Style] { + let styleNames = styleName.split(separator: ":") + var result = [Style]() + for name in styleNames { + let strName = String(name) + if let style = components[strName] { + result.append(style) + } else if let resolver = resolvers[strName] { + let style = Style() + resolver(style) + if let dependency = dependencies[strName] { + style.append(self.get(dependency)) + } + result.append(style) + } else { + assertionFailure("Style Not found:\(name)") + } + } + return result + } + + func register() { + fatalError("You should register stylesheets in subclass") + } +} diff --git a/iphone/Maps/UI/Appearance/ThemeManager.swift b/iphone/Maps/Core/Theme/Core/ThemeManager.swift similarity index 60% rename from iphone/Maps/UI/Appearance/ThemeManager.swift rename to iphone/Maps/Core/Theme/Core/ThemeManager.swift index 7b3ecdfa8d..2ae36bda13 100644 --- a/iphone/Maps/UI/Appearance/ThemeManager.swift +++ b/iphone/Maps/Core/Theme/Core/ThemeManager.swift @@ -1,12 +1,19 @@ @objc(MWMThemeManager) final class ThemeManager: NSObject { - private static let autoUpdatesInterval: TimeInterval = 30 * 60 // 30 minutes in seconds private static let instance = ThemeManager() private weak var timer: Timer? + private var isDarkModeEnabled: Bool = false - private override init() { super.init() } + private override init() { + super.init() + } + + @objc static func setDarkModeEnabled(_ val: Bool) { + instance.isDarkModeEnabled = val + instance.update(theme: MWMSettings.theme()) + } private func update(theme: MWMTheme) { let actualTheme: MWMTheme = { theme in @@ -17,10 +24,15 @@ final class ThemeManager: NSObject { case .night: fallthrough case .vehicleNight: return isVehicleRouting ? .vehicleNight : .night case .auto: - guard isVehicleRouting else { return .day } - switch FrameworkHelper.daytime(at: MWMLocationManager.lastLocation()) { - case .day: return .vehicleDay - case .night: return .vehicleNight + if #available(iOS 13.0, *) { + guard isVehicleRouting else { return isDarkModeEnabled ? .night : .day } + return isDarkModeEnabled ? .vehicleNight : .vehicleDay + } else { + guard isVehicleRouting else { return .day } + switch FrameworkHelper.daytime(at: MWMLocationManager.lastLocation()) { + case .day: return .vehicleDay + case .night: return .vehicleNight + } } } }(theme) @@ -36,10 +48,15 @@ final class ThemeManager: NSObject { } }(actualTheme) + FrameworkHelper.setTheme(actualTheme) - if nightMode != newNightMode { + if nightMode != newNightMode || StyleManager.instance().hasTheme() == false{ UIColor.setNightMode(newNightMode) - (UIViewController.topViewController() as! MWMController).mwm_refreshUI() + if newNightMode { + StyleManager.instance().setTheme(MainTheme(type: .dark, colors: NightColors(), fonts: Fonts())) + } else { + StyleManager.instance().setTheme(MainTheme(type: .light, colors: DayColors(), fonts: Fonts())) + } } } diff --git a/iphone/Maps/Core/Theme/DiscoveryStyleSheet.swift b/iphone/Maps/Core/Theme/DiscoveryStyleSheet.swift new file mode 100644 index 0000000000..84cad303cf --- /dev/null +++ b/iphone/Maps/Core/Theme/DiscoveryStyleSheet.swift @@ -0,0 +1,27 @@ +class DiscoveryStyleSheet: IStyleSheet { + static func register(theme: Theme, colors: IColors, fonts: IFonts) { + theme.add(styleName: "DiscoveryCell") { (s) -> (Void) in + s.backgroundColor = colors.white + s.cornerRadius = 8 + s.borderWidth = 1 + s.borderColor = colors.blackDividers + s.clip = true + } + + theme.add(styleName: "DiscoveryPopularView") { (s) -> (Void) in + s.backgroundColor = colors.linkBlueHighlighted + s.cornerRadius = 10 + s.borderColor = colors.blackDividers + s.clip = true + } + + theme.add(styleName: "DiscoveryController") { (s) -> (Void) in + s.backgroundColor = colors.pressBackground + } + + theme.add(styleName: "DiscoveryMoreImage") { (s) -> (Void) in + s.mwmImage = "btn_float_more" + s.coloring = .other + } + } +} diff --git a/iphone/Maps/Core/Theme/Extensions/SwizzleStyle.h b/iphone/Maps/Core/Theme/Extensions/SwizzleStyle.h new file mode 100644 index 0000000000..304ea483c0 --- /dev/null +++ b/iphone/Maps/Core/Theme/Extensions/SwizzleStyle.h @@ -0,0 +1,11 @@ +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface SwizzleStyle : NSObject + ++ (void)addSwizzle; + +@end + +NS_ASSUME_NONNULL_END diff --git a/iphone/Maps/Core/Theme/Extensions/SwizzleStyle.m b/iphone/Maps/Core/Theme/Extensions/SwizzleStyle.m new file mode 100644 index 0000000000..7e674b9537 --- /dev/null +++ b/iphone/Maps/Core/Theme/Extensions/SwizzleStyle.m @@ -0,0 +1,34 @@ +#import "SwizzleStyle.h" +#import +#import "objc/runtime.h" +#import "objc/message.h" + +@implementation SwizzleStyle ++ (void)addSwizzle { + [SwizzleStyle swizzle:[UIView class] methodName:@"didMoveToWindow"]; + + [self swizzle:[UITextField class] methodName:@"textRectForBounds:"]; + [self swizzle:[UITextField class] methodName:@"editingRectForBounds:"]; + + [SwizzleStyle swizzle:[UIWindow class] methodName:@"becomeKeyWindow"]; +} + ++ (void)swizzle:(Class)class methodName:(NSString*)methodName +{ + SEL originalMethod = NSSelectorFromString(methodName); + SEL newMethod = NSSelectorFromString([NSString stringWithFormat:@"%@%@", @"sw_", methodName]); + [SwizzleStyle swizzle:class from:originalMethod to:newMethod]; +} + ++ (void)swizzle:(Class)class from:(SEL)original to:(SEL)new +{ + Method originalMethod = class_getInstanceMethod(class, original); + Method newMethod = class_getInstanceMethod(class, new); + if (class_addMethod(class, original, method_getImplementation(newMethod), method_getTypeEncoding(newMethod))) { + class_replaceMethod(class, new, method_getImplementation(originalMethod), method_getTypeEncoding(originalMethod)); + } else { + method_exchangeImplementations(originalMethod, newMethod); + } +} + +@end diff --git a/iphone/Maps/Core/Theme/Extensions/UIColor+image.swift b/iphone/Maps/Core/Theme/Extensions/UIColor+image.swift new file mode 100644 index 0000000000..7c000d52dd --- /dev/null +++ b/iphone/Maps/Core/Theme/Extensions/UIColor+image.swift @@ -0,0 +1,11 @@ +extension UIColor { + func getImage() -> UIImage? { + let rect = CGRect(x: 0, y: 0, width: 1, height: 1) + UIGraphicsBeginImageContext(rect.size) + self.setFill() + UIRectFill(rect) + let image = UIGraphicsGetImageFromCurrentImageContext() + UIGraphicsEndImageContext() + return image + } +} diff --git a/iphone/Maps/Core/Theme/Extensions/UIColor+rgba.swift b/iphone/Maps/Core/Theme/Extensions/UIColor+rgba.swift new file mode 100644 index 0000000000..4c101f24fd --- /dev/null +++ b/iphone/Maps/Core/Theme/Extensions/UIColor+rgba.swift @@ -0,0 +1,5 @@ +extension UIColor { + convenience init(_ r: CGFloat, _ g: CGFloat, _ b :CGFloat, _ a: CGFloat) { + self.init(red: CGFloat(r/255.0), green: CGFloat(g/255.0), blue: CGFloat(b/255.0), alpha: a) + } +} diff --git a/iphone/Maps/Core/Theme/Extensions/UIView+styleName.swift b/iphone/Maps/Core/Theme/Extensions/UIView+styleName.swift new file mode 100644 index 0000000000..8d60d934aa --- /dev/null +++ b/iphone/Maps/Core/Theme/Extensions/UIView+styleName.swift @@ -0,0 +1,42 @@ +struct AssociatedKeys { + static var styleName: UInt8 = 0 + static var isStyleApplied: UInt8 = 1 +} + +@objc extension UIView { + @objc func sw_didMoveToWindow() { + self.applyTheme() + self.isStyleApplied = true + self.sw_didMoveToWindow(); + } + + @objc var styleName: String { + get { + isStyleApplied = false + guard let value = objc_getAssociatedObject(self, &AssociatedKeys.styleName) as? String else { + return "" + } + return value + } + set(newValue) { + objc_setAssociatedObject(self, &AssociatedKeys.styleName, newValue, objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN_NONATOMIC) + } + } + + @objc var isStyleApplied: Bool { + get { + guard let value = objc_getAssociatedObject(self, &AssociatedKeys.isStyleApplied) as? Bool else { + return false + } + return value + } + set(newValue) { + objc_setAssociatedObject(self, &AssociatedKeys.isStyleApplied, newValue, objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN_NONATOMIC) + } + } + + @objc func setStyleAndApply(_ styleName: String) { + self.styleName = styleName + self.applyTheme() + } +} diff --git a/iphone/Maps/Core/Theme/FontStyleSheet.swift b/iphone/Maps/Core/Theme/FontStyleSheet.swift new file mode 100644 index 0000000000..091d49a18b --- /dev/null +++ b/iphone/Maps/Core/Theme/FontStyleSheet.swift @@ -0,0 +1,176 @@ +class FontStyleSheet: IStyleSheet { + static func register(theme: Theme, colors: IColors, fonts: IFonts) { + theme.add(styleName: "regular9") { (s) -> (Void) in + s.font = fonts.regular9 + } + theme.add(styleName: "regular10") { (s) -> (Void) in + s.font = fonts.regular10 + } + theme.add(styleName: "regular11") { (s) -> (Void) in + s.font = fonts.regular11 + } + theme.add(styleName: "regular12") { (s) -> (Void) in + s.font = fonts.regular12 + } + theme.add(styleName: "regular13") { (s) -> (Void) in + s.font = fonts.regular13 + } + theme.add(styleName: "regular14") { (s) -> (Void) in + s.font = fonts.regular14 + } + theme.add(styleName: "regular15") { (s) -> (Void) in + s.font = fonts.regular15 + } + theme.add(styleName: "regular16") { (s) -> (Void) in + s.font = fonts.regular16 + } + theme.add(styleName: "regular17") { (s) -> (Void) in + s.font = fonts.regular17 + } + theme.add(styleName: "regular18") { (s) -> (Void) in + s.font = fonts.regular18 + } + theme.add(styleName: "regular20") { (s) -> (Void) in + s.font = fonts.regular20 + } + theme.add(styleName: "regular24") { (s) -> (Void) in + s.font = fonts.regular24 + } + theme.add(styleName: "regular32") { (s) -> (Void) in + s.font = fonts.regular32 + } + theme.add(styleName: "regular52") { (s) -> (Void) in + s.font = fonts.regular52 + } + theme.add(styleName: "medium9") { (s) -> (Void) in + s.font = fonts.medium9 + } + theme.add(styleName: "medium10") { (s) -> (Void) in + s.font = fonts.medium10 + } + theme.add(styleName: "medium12") { (s) -> (Void) in + s.font = fonts.medium12 + } + theme.add(styleName: "medium14") { (s) -> (Void) in + s.font = fonts.medium14 + } + theme.add(styleName: "medium16") { (s) -> (Void) in + s.font = fonts.medium16 + } + theme.add(styleName: "medium17") { (s) -> (Void) in + s.font = fonts.medium17 + } + theme.add(styleName: "medium18") { (s) -> (Void) in + s.font = fonts.medium18 + } + theme.add(styleName: "medium20") { (s) -> (Void) in + s.font = fonts.medium20 + } + theme.add(styleName: "medium24") { (s) -> (Void) in + s.font = fonts.medium24 + } + theme.add(styleName: "medium28") { (s) -> (Void) in + s.font = fonts.medium28 + } + theme.add(styleName: "medium36") { (s) -> (Void) in + s.font = fonts.medium36 + } + theme.add(styleName: "medium40") { (s) -> (Void) in + s.font = fonts.medium40 + } + theme.add(styleName: "medium44") { (s) -> (Void) in + s.font = fonts.medium44 + } + theme.add(styleName: "light10") { (s) -> (Void) in + s.font = fonts.light10 + } + theme.add(styleName: "light12") { (s) -> (Void) in + s.font = fonts.light12 + } + theme.add(styleName: "light16") { (s) -> (Void) in + s.font = fonts.light16 + } + theme.add(styleName: "light17") { (s) -> (Void) in + s.font = fonts.light17 + } + theme.add(styleName: "bold12") { (s) -> (Void) in + s.font = fonts.bold12 + } + theme.add(styleName: "bold14") { (s) -> (Void) in + s.font = fonts.bold14 + } + theme.add(styleName: "bold16") { (s) -> (Void) in + s.font = fonts.bold16 + } + theme.add(styleName: "bold17") { (s) -> (Void) in + s.font = fonts.bold17 + } + theme.add(styleName: "bold22") { (s) -> (Void) in + s.font = fonts.bold22 + } + theme.add(styleName: "bold24") { (s) -> (Void) in + s.font = fonts.bold24 + } + theme.add(styleName: "bold28") { (s) -> (Void) in + s.font = fonts.bold28 + } + theme.add(styleName: "bold34") { (s) -> (Void) in + s.font = fonts.bold34 + } + theme.add(styleName: "bold36") { (s) -> (Void) in + s.font = fonts.bold36 + } + theme.add(styleName: "bold48") { (s) -> (Void) in + s.font = fonts.bold48 + } + theme.add(styleName: "italic16") { (s) -> (Void) in + s.font = fonts.italic16 + } + theme.add(styleName: "semibold12") { (s) -> (Void) in + s.font = fonts.semibold12 + } + theme.add(styleName: "semibold14") { (s) -> (Void) in + s.font = fonts.semibold14 + } + theme.add(styleName: "semibold15") { (s) -> (Void) in + s.font = fonts.semibold15 + } + theme.add(styleName: "semibold16") { (s) -> (Void) in + s.font = fonts.semibold16 + } + theme.add(styleName: "fredokaRegular25") { (s) -> (Void) in + s.font = fonts.fredokaRegular25 + } + + theme.add(styleName: "whitePrimaryText") { (s) -> (Void) in + s.fontColor = colors.whitePrimaryText + } + theme.add(styleName: "blackSecondaryText") { (s) -> (Void) in + s.fontColor = colors.blackSecondaryText + } + theme.add(styleName: "blackPrimaryText") { (s) -> (Void) in + s.fontColor = colors.blackPrimaryText + } + theme.add(styleName: "linkBlueText") { (s) -> (Void) in + s.fontColor = colors.linkBlue + } + theme.add(styleName: "linkBlueHighlightedText") { (s) -> (Void) in + s.fontColor = colors.linkBlueHighlighted + } + theme.add(styleName: "whiteText") { (s) -> (Void) in + s.fontColor = colors.white + } + theme.add(styleName: "blackHintText") { (s) -> (Void) in + s.fontColor = colors.blackHintText + } + theme.add(styleName: "greenText") { (s) -> (Void) in + s.fontColor = colors.ratingGreen + } + theme.add(styleName: "redText") { (s) -> (Void) in + s.fontColor = colors.red + } + theme.add(styleName: "buttonRedText") { (s) -> (Void) in + s.fontColor = colors.buttonRed + } + } +} diff --git a/iphone/Maps/Core/Theme/Fonts.swift b/iphone/Maps/Core/Theme/Fonts.swift new file mode 100644 index 0000000000..3b9ee50de4 --- /dev/null +++ b/iphone/Maps/Core/Theme/Fonts.swift @@ -0,0 +1,49 @@ +class Fonts: IFonts { + var regular9 = UIFont.systemFont(ofSize: 9) + var regular10 = UIFont.systemFont(ofSize: 10) + var regular11 = UIFont.systemFont(ofSize: 11) + var regular12 = UIFont.systemFont(ofSize: 12) + var regular13 = UIFont.systemFont(ofSize: 13) + var regular14 = UIFont.systemFont(ofSize: 14) + var regular15 = UIFont.systemFont(ofSize: 15) + var regular16 = UIFont.systemFont(ofSize: 16) + var regular17 = UIFont.systemFont(ofSize: 17) + var regular18 = UIFont.systemFont(ofSize: 18) + var regular20 = UIFont.systemFont(ofSize: 20) + var regular24 = UIFont.systemFont(ofSize: 24) + var regular32 = UIFont.systemFont(ofSize: 32) + var regular52 = UIFont.systemFont(ofSize: 52) + var medium9 = UIFont.systemFont(ofSize: 9, weight:UIFont.Weight.medium) + var medium10 = UIFont.systemFont(ofSize: 10, weight:UIFont.Weight.medium) + var medium12 = UIFont.systemFont(ofSize: 12, weight:UIFont.Weight.medium) + var medium14 = UIFont.systemFont(ofSize: 14, weight:UIFont.Weight.medium) + var medium16 = UIFont.systemFont(ofSize: 16, weight:UIFont.Weight.medium) + var medium17 = UIFont.systemFont(ofSize: 17, weight:UIFont.Weight.medium) + var medium18 = UIFont.systemFont(ofSize: 18, weight:UIFont.Weight.medium) + var medium20 = UIFont.systemFont(ofSize: 20, weight:UIFont.Weight.medium) + var medium24 = UIFont.systemFont(ofSize: 24, weight:UIFont.Weight.medium) + var medium28 = UIFont.systemFont(ofSize: 28, weight:UIFont.Weight.medium) + var medium36 = UIFont.systemFont(ofSize: 36, weight:UIFont.Weight.medium) + var medium40 = UIFont.systemFont(ofSize: 40, weight:UIFont.Weight.medium) + var medium44 = UIFont.systemFont(ofSize: 44, weight:UIFont.Weight.medium) + var light10 = UIFont.systemFont(ofSize: 10, weight:UIFont.Weight.light) + var light12 = UIFont.systemFont(ofSize: 12, weight:UIFont.Weight.light) + var light16 = UIFont.systemFont(ofSize: 16, weight:UIFont.Weight.light) + var light17 = UIFont.systemFont(ofSize: 17, weight:UIFont.Weight.light) + var bold12 = UIFont.boldSystemFont(ofSize: 12) + var bold14 = UIFont.boldSystemFont(ofSize: 14) + var bold16 = UIFont.boldSystemFont(ofSize: 16) + var bold17 = UIFont.boldSystemFont(ofSize: 17) + var bold22 = UIFont.boldSystemFont(ofSize: 22) + var bold24 = UIFont.boldSystemFont(ofSize: 24) + var bold28 = UIFont.boldSystemFont(ofSize: 28) + var bold34 = UIFont.boldSystemFont(ofSize: 34) + var bold36 = UIFont.boldSystemFont(ofSize: 26) + var bold48 = UIFont.boldSystemFont(ofSize: 48) + var italic16 = UIFont.italicSystemFont(ofSize: 16) + var semibold12 = UIFont.systemFont(ofSize: 14, weight:UIFont.Weight.semibold) + var semibold14 = UIFont.systemFont(ofSize: 14, weight:UIFont.Weight.semibold) + var semibold15 = UIFont.systemFont(ofSize: 15, weight:UIFont.Weight.semibold) + var semibold16 = UIFont.systemFont(ofSize: 16, weight:UIFont.Weight.semibold) + var fredokaRegular25 = UIFont(name: "FredokaOne-Regular", size: 25) ?? UIFont.boldSystemFont(ofSize: 48) +} diff --git a/iphone/Maps/Core/Theme/GlobalStyleSheet.swift b/iphone/Maps/Core/Theme/GlobalStyleSheet.swift new file mode 100644 index 0000000000..53965d468c --- /dev/null +++ b/iphone/Maps/Core/Theme/GlobalStyleSheet.swift @@ -0,0 +1,298 @@ +import Foundation + +class GlobalStyleSheet: IStyleSheet { + static func register(theme: Theme, colors: IColors, fonts: IFonts) { + //MARK: Defaults + theme.add(styleName: "TableView") { (s) -> (Void) in + s.backgroundColor = colors.white + s.separatorColor = colors.blackDividers + } + + theme.add(styleName: "TableCell") { (s) -> (Void) in + s.backgroundColor = colors.white + s.fontColor = colors.blackPrimaryText + s.tintColor = colors.blackPrimaryText + s.fontColorDetailed = colors.blackSecondaryText + } + + theme.add(styleName: "MWMTableViewCell") { (s) -> (Void) in + s.backgroundColor = colors.white + s.fontColor = colors.blackPrimaryText + s.tintColor = colors.blackPrimaryText + s.fontColorDetailed = colors.blackSecondaryText + s.backgroundColorSelected = colors.pressBackground + } + + theme.add(styleName: "TableViewHeaderFooterView") { (s) -> (Void) in + s.font = fonts.medium14 + s.fontColor = colors.blackSecondaryText + } + + theme.add(styleName: "SearchBar") { (s) -> (Void) in + s.backgroundColor = colors.white + s.barTintColor = colors.primary + s.tintColor = colors.blackPrimaryText + s.fontColor = colors.blackSecondaryText + } + + theme.add(styleName: "NavigationBar") { (s) -> (Void) in + s.barTintColor = colors.primary + s.tintColor = colors.whitePrimaryText + s.backgroundImage = UIImage() + s.shadowImage = UIImage() + s.font = fonts.regular18 + s.fontColor = colors.whitePrimaryText + } + + theme.add(styleName: "NavigationButton") { (s) -> (Void) in + s.font = fonts.regular18 + s.fontColor = colors.whitePrimaryText + s.fontColorHighlighted = colors.whitePrimaryTextHighlighted + } + + theme.add(styleName: "Checkmark") { (s) -> (Void) in + s.onTintColor = colors.linkBlue + s.offTintColor = colors.blackHintText + } + + theme.add(styleName: "Switch") { (s) -> (Void) in + s.onTintColor = colors.linkBlue + } + + theme.add(styleName: "PageControl") { (s) -> (Void) in + s.pageIndicatorTintColor = colors.blackHintText + s.currentPageIndicatorTintColor = colors.blackSecondaryText + s.backgroundColor = colors.white + } + + //MARK: Global styles + theme.add(styleName: "Divider") { (s) -> (Void) in + s.backgroundColor = colors.blackDividers + } + + theme.add(styleName: "Background") { (s) -> (Void) in + s.backgroundColor = colors.white + } + + theme.add(styleName: "PressBackground") { (s) -> (Void) in + s.backgroundColor = colors.pressBackground + } + + theme.add(styleName: "PrimaryBackground") { (s) -> (Void) in + s.backgroundColor = colors.primary + } + + theme.add(styleName: "SecondaryBackground") { (s) -> (Void) in + s.backgroundColor = colors.secondary + } + + theme.add(styleName: "MenuBackground") { (s) -> (Void) in + s.backgroundColor = colors.menuBackground + } + + theme.add(styleName: "BlackOpaqueBackground") { (s) -> (Void) in + s.backgroundColor = colors.blackOpaque + } + + theme.add(styleName: "BlueBackground") { (s) -> (Void) in + s.backgroundColor = colors.linkBlue + } + + theme.add(styleName: "ToastBackground") { (s) -> (Void) in + s.backgroundColor = colors.toastBackground + } + + theme.add(styleName: "FadeBackground") { (s) -> (Void) in + s.backgroundColor = colors.fadeBackground + } + + theme.add(styleName: "ErrorBackground") { (s) -> (Void) in + s.backgroundColor = colors.errorPink + } + + theme.add(styleName: "BlackStatusBarBackground") { (s) -> (Void) in + s.backgroundColor = colors.blackStatusBarBackground + } + + theme.add(styleName: "TabView") { (s) -> (Void) in + s.backgroundColor = colors.pressBackground + s.barTintColor = colors.primary + s.tintColor = colors.white + s.fontColor = colors.whitePrimaryText + s.font = fonts.medium14 + } + + theme.add(styleName: "DialogView") { (s) -> (Void) in + s.cornerRadius = 8 + s.shadowRadius = 2 + s.shadowColor = UIColor(0,0,0,alpha26) + s.shadowOpacity = 1 + s.shadowOffset = CGSize(width: 0, height: 1) + s.backgroundColor = colors.white + s.clip = true + } + + theme.add(styleName: "AlertView") { (s) -> (Void) in + s.cornerRadius = 12 + s.shadowRadius = 6 + s.shadowColor = UIColor(0,0,0,alpha20) + s.shadowOpacity = 1 + s.shadowOffset = CGSize(width: 0, height: 3) + s.backgroundColor = colors.alertBackground + s.clip = true + } + + theme.add(styleName: "AlertViewTextField") { (s) -> (Void) in + s.borderColor = colors.blackDividers + s.borderWidth = 0.5 + s.backgroundColor = colors.white + } + + theme.add(styleName: "SearchStatusBarView") { (s) -> (Void) in + s.backgroundColor = colors.primary + s.shadowRadius = 2 + s.shadowColor = colors.blackDividers + s.shadowOpacity = 1 + s.shadowOffset = CGSize(width: 0, height: 0) + } + + //MARK: Buttons + theme.add(styleName: "FlatNormalButton") { (s) -> (Void) in + s.font = fonts.medium14 + s.cornerRadius = 8 + s.clip = true + s.fontColor = colors.whitePrimaryText + s.backgroundColor = colors.linkBlue + s.fontColorHighlighted = colors.whitePrimaryTextHighlighted + s.fontColorDisabled = colors.whitePrimaryTextHighlighted + s.backgroundColorHighlighted = colors.linkBlueHighlighted + } + + theme.add(styleName: "FlatNormalButtonBig", from: "FlatNormalButton") { (s) -> (Void) in + s.font = fonts.regular17 + } + + theme.add(styleName: "FlatNormalTransButton") { (s) -> (Void) in + s.font = fonts.medium14 + s.cornerRadius = 8 + s.clip = true + s.fontColor = colors.linkBlue + s.backgroundColor = colors.clear + s.fontColorHighlighted = colors.linkBlueHighlighted + s.backgroundColorHighlighted = colors.clear + } + + theme.add(styleName: "FlatNormalTransButtonBig", from: "FlatNormalTransButton") { (s) -> (Void) in + s.font = fonts.regular17 + } + + theme.add(styleName: "FlatGrayTransButton") { (s) -> (Void) in + s.font = fonts.medium14 + s.fontColor = colors.blackSecondaryText + s.backgroundColor = colors.clear + s.fontColorHighlighted = colors.linkBlueHighlighted + } + + theme.add(styleName: "FlatRedTransButton") { (s) -> (Void) in + s.font = fonts.medium14 + s.fontColor = colors.red + s.backgroundColor = colors.clear + s.fontColorHighlighted = colors.red + } + + theme.add(styleName: "FlatRedTransButtonBig") { (s) -> (Void) in + s.font = fonts.regular17 + s.fontColor = colors.red + s.backgroundColor = colors.clear + s.fontColorHighlighted = colors.red + } + + theme.add(styleName: "FlatRedButton") { (s) -> (Void) in + s.font = fonts.medium14 + s.cornerRadius = 8 + s.fontColor = colors.whitePrimaryText + s.backgroundColor = colors.buttonRed + s.fontColorHighlighted = colors.buttonRedHighlighted + } + + theme.add(styleName: "MoreButton") { (s) -> (Void) in + s.fontColor = colors.linkBlue + s.fontColorHighlighted = colors.linkBlueHighlighted + s.backgroundColor = colors.white + s.font = fonts.regular16 + } + + theme.add(styleName: "EditButton") { (s) -> (Void) in + s.font = fonts.regular14 + s.fontColor = colors.linkBlue + s.cornerRadius = 8 + s.borderColor = colors.linkBlue + s.borderWidth = 1 + s.fontColorHighlighted = colors.linkBlueHighlighted + s.backgroundColor = colors.clear + } + + theme.add(styleName: "RateAppButton") { (s) -> (Void) in + s.font = fonts.medium17 + s.fontColor = colors.linkBlue + s.fontColorHighlighted = colors.white + s.borderColor = colors.linkBlue + s.cornerRadius = 8 + s.borderWidth = 1 + s.backgroundColor = colors.clear + s.backgroundColorHighlighted = colors.linkBlue + } + + theme.add(styleName: "TermsOfUseLinkText") { (s) -> (Void) in + s.font = fonts.regular16 + s.fontColor = colors.blackPrimaryText + + s.linkAttributes = [NSAttributedString.Key.font: fonts.regular16, + NSAttributedString.Key.foregroundColor: colors.linkBlue, + NSAttributedString.Key.underlineColor: UIColor.clear] + s.textContainerInset = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0) + } + + theme.add(styleName: "TermsOfUseGrayButton") { (s) -> (Void) in + s.font = fonts.medium10 + s.fontColor = colors.blackSecondaryText + s.fontColorHighlighted = colors.blackHintText + } + + theme.add(styleName: "Badge") { (s) -> (Void) in + s.round = true + s.backgroundColor = colors.downloadBadgeBackground + } + + //MARK: coloring + theme.add(styleName: "MWMBlue") { (s) -> (Void) in + s.tintColor = colors.linkBlue + s.coloring = MWMButtonColoring.blue + } + + theme.add(styleName: "MWMBlack") { (s) -> (Void) in + s.tintColor = colors.blackSecondaryText + s.coloring = MWMButtonColoring.black + } + + theme.add(styleName: "MWMOther") { (s) -> (Void) in + s.tintColor = colors.white + s.coloring = MWMButtonColoring.other + } + + theme.add(styleName: "MWMGray") { (s) -> (Void) in + s.tintColor = colors.blackHintText + s.coloring = MWMButtonColoring.gray + } + + theme.add(styleName: "MWMSeparator") { (s) -> (Void) in + s.tintColor = colors.blackDividers + s.coloring = MWMButtonColoring.black + } + + theme.add(styleName: "MWMWhite") { (s) -> (Void) in + s.tintColor = colors.white + s.coloring = MWMButtonColoring.white + } + } +} diff --git a/iphone/Maps/Core/Theme/MainTheme.swift b/iphone/Maps/Core/Theme/MainTheme.swift new file mode 100644 index 0000000000..cde6f46273 --- /dev/null +++ b/iphone/Maps/Core/Theme/MainTheme.swift @@ -0,0 +1,14 @@ +class MainTheme: Theme { + override func register() { + self.registerStyleSheet(GlobalStyleSheet.self) + self.registerStyleSheet(FontStyleSheet.self) + self.registerStyleSheet(DiscoveryStyleSheet.self) + self.registerStyleSheet(SearchStyleSheet.self) + self.registerStyleSheet(AdsStyleSheet.self) + self.registerStyleSheet(BookmarksStyleSheet.self) + self.registerStyleSheet(MapStyleSheet.self) + self.registerStyleSheet(AuthStyleSheet.self) + self.registerStyleSheet(SubscriptionsStyleSheet.self) + } +} + diff --git a/iphone/Maps/Core/Theme/MapStyleSheet.swift b/iphone/Maps/Core/Theme/MapStyleSheet.swift new file mode 100644 index 0000000000..f90e9d4118 --- /dev/null +++ b/iphone/Maps/Core/Theme/MapStyleSheet.swift @@ -0,0 +1,172 @@ +class MapStyleSheet: IStyleSheet { + static func register(theme: Theme, colors: IColors, fonts: IFonts) { + theme.add(styleName: "LayersTrafficButtonEnabled") { (s) -> (Void) in + s.fontColor = colors.linkBlue + s.mwmImage = "btn_menu_traffic_on" + } + + theme.add(styleName: "LayersTrafficButtonDisabled") { (s) -> (Void) in + s.fontColor = colors.blackSecondaryText + s.mwmImage = "btn_menu_traffic_off" + } + + theme.add(styleName: "LayersSubwayButtonEnabled") { (s) -> (Void) in + s.fontColor = colors.linkBlue + s.mwmImage = "btn_menu_subway_on" + } + + theme.add(styleName: "LayersSubwayButtonDisabled") { (s) -> (Void) in + s.fontColor = colors.blackSecondaryText + s.mwmImage = "btn_menu_subway_off" + } + + theme.add(styleName: "StreetNameBackgroundView") { (s) -> (Void) in + s.backgroundColor = colors.white + s.shadowRadius = 2 + s.shadowColor = UIColor(0, 0, 0, alpha26) + s.shadowOpacity = 1 + s.shadowOffset = CGSize(width: 0, height: 1) + } + + theme.add(styleName: "PPRatingHorrible") { (s) -> (Void) in + s.image = "ic_24px_rating_horrible" + s.tintColor = colors.ratingRed + } + + theme.add(styleName: "PPRatingBad") { (s) -> (Void) in + s.image = "ic_24px_rating_bad" + s.tintColor = colors.ratingOrange + } + + theme.add(styleName: "PPRatingNormal") { (s) -> (Void) in + s.image = "ic_24px_rating_normal" + s.tintColor = colors.ratingYellow + } + + theme.add(styleName: "PPRatingGood") { (s) -> (Void) in + s.image = "ic_24px_rating_good" + s.tintColor = colors.ratingLightGreen + } + + theme.add(styleName: "PPRatingExellent") { (s) -> (Void) in + s.image = "ic_24px_rating_excellent" + s.tintColor = colors.ratingGreen + } + + theme.add(styleName: "ButtonZoomIn") { (s) -> (Void) in + s.mwmImage = "btn_zoom_in" + } + + theme.add(styleName: "ButtonZoomOut") { (s) -> (Void) in + s.mwmImage = "btn_zoom_out" + } + + theme.add(styleName: "ButtonPending") { (s) -> (Void) in + s.mwmImage = "btn_pending" + } + + theme.add(styleName: "ButtonGetPosition") { (s) -> (Void) in + s.mwmImage = "btn_get_position" + } + + theme.add(styleName: "ButtonFollow") { (s) -> (Void) in + s.mwmImage = "btn_follow" + } + + theme.add(styleName: "ButtonFollowAndRotate") { (s) -> (Void) in + s.mwmImage = "btn_follow_and_rotate" + } + + theme.add(styleName: "ButtonMapBookmarks") { (s) -> (Void) in + s.mwmImage = "ic_routing_bookmark" + } + + theme.add(styleName: "PromoDiscroveryButton") { (s) -> (Void) in + s.mwmImage = "promo_discovery_button" + } + + theme.add(styleName: "FirstTurnView") { (s) -> (Void) in + s.backgroundColor = colors.linkBlue + s.cornerRadius = 4 + s.shadowRadius = 2 + s.shadowColor = colors.blackHintText + s.shadowOpacity = 1 + s.shadowOffset = CGSize(width: 0, height: 2) + } + + theme.add(styleName: "SecondTurnView", from: "FirstTurnView") { (s) -> (Void) in + s.backgroundColor = colors.white + } + + theme.add(styleName: "MapAutoupdateView") { (s) -> (Void) in + s.shadowOffset = CGSize(width: 0, height: 3) + s.shadowRadius = 6 + s.cornerRadius = 4 + s.shadowOpacity = 1 + s.backgroundColor = colors.white + } + + theme.add(styleName: "PPReviewDiscountView") { (s) -> (Void) in + s.backgroundColor = colors.linkBlue + s.round = true + } + + theme.add(styleName: "PPTitlePopularView") { (s) -> (Void) in + s.backgroundColor = colors.linkBlueHighlighted + s.round = true + } + + theme.add(styleName: "RouteBasePreview") { (s) -> (Void) in + s.borderColor = colors.blackDividers + s.borderWidth = 1 + s.backgroundColor = colors.white + } + + theme.add(styleName: "RoutePreview") { (s) -> (Void) in + s.shadowRadius = 2 + s.shadowColor = colors.blackDividers + s.shadowOpacity = 1 + s.shadowOffset = CGSize(width: 3, height: 0) + s.backgroundColor = colors.pressBackground + } + + theme.add(styleName: "RatingSummaryView24") { (s) -> (Void) in + s.font = fonts.bold16 + s.fontColorHighlighted = colors.ratingYellow //filled color + s.fontColorDisabled = colors.blackDividers //empty color + s.colors = [ + colors.blackSecondaryText, //noValue + colors.ratingRed, //horrible + colors.ratingOrange, //bad + colors.ratingYellow, //normal + colors.ratingLightGreen, //good + colors.ratingGreen //exellent + ] + s.images = [ + "ic_24px_rating_normal", //noValue + "ic_24px_rating_horrible", //horrible + "ic_24px_rating_bad", //bad + "ic_24px_rating_normal", //normal + "ic_24px_rating_good", //good + "ic_24px_rating_excellent" //exellent + ] + } + + theme.add(styleName: "RatingSummaryView12", from: "RatingSummaryView24") { (s) -> (Void) in + s.font = fonts.bold12 + s.images = [ + "ic_12px_rating_normal", + "ic_12px_rating_horrible", + "ic_12px_rating_bad", + "ic_12px_rating_normal", + "ic_12px_rating_good", + "ic_12px_rating_excellent" + ] + } + + theme.add(styleName: "RatingSummaryView12User", from: "RatingSummaryView12") { (s) -> (Void) in + s.colors?[0] = colors.linkBlue + s.images?[0] = "ic_12px_radio_on" + } + } +} diff --git a/iphone/Maps/Core/Theme/Renderers/CheckmarkRenderer.swift b/iphone/Maps/Core/Theme/Renderers/CheckmarkRenderer.swift new file mode 100644 index 0000000000..edd71651da --- /dev/null +++ b/iphone/Maps/Core/Theme/Renderers/CheckmarkRenderer.swift @@ -0,0 +1,24 @@ +import Foundation +extension Checkmark { + @objc override func applyTheme() { + if styleName.isEmpty { + styleName = "Checkmark" + } + for style in StyleManager.instance().getStyle(styleName) { + CheckmarkRenderer.render(self, style: style) + } + } +} + +class CheckmarkRenderer { + class func render(_ control: Checkmark, style: Style) { + if let onTintColor = style.onTintColor { + control.onTintColor = onTintColor + } + + if let offTintColor = style.offTintColor { + control.offTintColor = offTintColor + } + } +} + diff --git a/iphone/Maps/Core/Theme/Renderers/MWMButtonRenderer.swift b/iphone/Maps/Core/Theme/Renderers/MWMButtonRenderer.swift new file mode 100644 index 0000000000..09177b5644 --- /dev/null +++ b/iphone/Maps/Core/Theme/Renderers/MWMButtonRenderer.swift @@ -0,0 +1,20 @@ +extension MWMButton { + @objc override func applyTheme() { + for style in StyleManager.instance().getStyle(styleName) { + MWMButtonRenderer.render(self, style: style) + } + } +} + +class MWMButtonRenderer { + class func render(_ control: MWMButton, style: Style) { + UIButtonRenderer.render(control, style: style) + if let coloring = style.coloring { + control.coloring = coloring + } + if let imageName = style.mwmImage { + control.imageName = imageName + } + } +} + diff --git a/iphone/Maps/Core/Theme/Renderers/MWMTableViewCellRenderer.swift b/iphone/Maps/Core/Theme/Renderers/MWMTableViewCellRenderer.swift new file mode 100644 index 0000000000..150dee6d40 --- /dev/null +++ b/iphone/Maps/Core/Theme/Renderers/MWMTableViewCellRenderer.swift @@ -0,0 +1,43 @@ +import Foundation +extension MWMTableViewCell { + @objc override func applyTheme() { + if styleName.isEmpty { + styleName = "MWMTableViewCell" + } + for style in StyleManager.instance().getStyle(styleName) { + MWMTableViewCellRenderer.render(self, style: style) + } + } +} + +class MWMTableViewCellRenderer { + class func render(_ control: MWMTableViewCell, style: Style) { + if let label = control.textLabel { + if let font = style.font { + label.font = font + } + if let fontColor = style.fontColor { + label.textColor = fontColor + } + } + if let detailedLabel = control.detailTextLabel { + if let fontDetailed = style.fontDetailed { + detailedLabel.font = fontDetailed + } + if let fontColorDetailed = style.fontColorDetailed { + detailedLabel.textColor = fontColorDetailed + } + } + if let tintColor = style.tintColor { + control.tintColor = tintColor + control.accessoryView?.tintColor = tintColor + } + if let backgroundColor = style.backgroundColor { + control.backgroundColor = backgroundColor + control.backgroundView = UIImageView(image: backgroundColor.getImage()) + } + if let backgroundColorSelected = style.backgroundColorSelected { + control.selectedBackgroundView = UIImageView(image: backgroundColorSelected.getImage()) + } + } +} diff --git a/iphone/Maps/Core/Theme/Renderers/RatingSummaryViewRenderer.swift b/iphone/Maps/Core/Theme/Renderers/RatingSummaryViewRenderer.swift new file mode 100644 index 0000000000..f65f7b042b --- /dev/null +++ b/iphone/Maps/Core/Theme/Renderers/RatingSummaryViewRenderer.swift @@ -0,0 +1,34 @@ +import Foundation +extension RatingSummaryView { + @objc override func applyTheme() { + for style in StyleManager.instance().getStyle(styleName) { + RatingSummaryViewRenderer.render(self, style: style) + } + } +} + +class RatingSummaryViewRenderer { + class func render(_ control: RatingSummaryView, style: Style) { + if let font = style.font { + control.textFont = font + control.textSize = font.pointSize + } + if let colors = style.colors, colors.count == 6 { + control.noValueColor = colors[0] + control.horribleColor = colors[1] + control.badColor = colors[2] + control.normalColor = colors[3] + control.goodColor = colors[4] + control.excellentColor = colors[5] + } + if let images = style.images, images.count == 6 { + control.normalImage = UIImage(named: images[0]) + control.horribleImage = UIImage(named: images[1]) + control.badImage = UIImage(named: images[2]) + control.normalImage = UIImage(named: images[3]) + control.goodImage = UIImage(named: images[4]) + control.excellentImage = UIImage(named: images[5]) + } + } +} + diff --git a/iphone/Maps/Core/Theme/Renderers/TabViewRenderer.swift b/iphone/Maps/Core/Theme/Renderers/TabViewRenderer.swift new file mode 100644 index 0000000000..53fc70ea99 --- /dev/null +++ b/iphone/Maps/Core/Theme/Renderers/TabViewRenderer.swift @@ -0,0 +1,29 @@ +import UIKit +extension TabView { + @objc override func applyTheme() { + if styleName.isEmpty { + styleName = "TabView" + } + for style in StyleManager.instance().getStyle(styleName) { + TabViewRenderer.render(self, style: style) + } + } +} + +class TabViewRenderer { + class func render(_ control: TabView, style: Style) { + if let backgroundColor = style.backgroundColor { + control.backgroundColor = backgroundColor + } + if let barTintColor = style.barTintColor { + control.barTintColor = barTintColor + } + if let tintColor = style.tintColor { + control.tintColor = tintColor + } + if let font = style.font, let fontColor = style.fontColor { + control.headerTextAttributes = [.foregroundColor: fontColor, + .font: font] + } + } +} diff --git a/iphone/Maps/Core/Theme/Renderers/UIActivityIndicatorRenderer.swift b/iphone/Maps/Core/Theme/Renderers/UIActivityIndicatorRenderer.swift new file mode 100644 index 0000000000..1cc3d24745 --- /dev/null +++ b/iphone/Maps/Core/Theme/Renderers/UIActivityIndicatorRenderer.swift @@ -0,0 +1,15 @@ +extension UIActivityIndicatorView { + @objc override func applyTheme() { + for style in StyleManager.instance().getStyle(styleName) { + UIActivityIndicatorRenderer.render(self, style: style) + } + } +} + +class UIActivityIndicatorRenderer { + class func render(_ control: UIActivityIndicatorView, style: Style) { + if let color = style.color { + control.color = color + } + } +} diff --git a/iphone/Maps/Core/Theme/Renderers/UIBarButtonItemRenderer.swift b/iphone/Maps/Core/Theme/Renderers/UIBarButtonItemRenderer.swift new file mode 100644 index 0000000000..14db92b6a2 --- /dev/null +++ b/iphone/Maps/Core/Theme/Renderers/UIBarButtonItemRenderer.swift @@ -0,0 +1,18 @@ +import UIKit +class UIBarButtonItemRenderer { + class func render(_ control: UIBarButtonItem, style: Style) { + if let backgroundImage = style.backgroundImage { + control.setBackgroundImage(backgroundImage, for: .normal, barMetrics: .default) + } + if let tintColor = style.tintColor { + control.tintColor = tintColor + } + if let backgroundColor = style.backgroundColor { + let layer: CALayer = CALayer() + layer.frame = CGRect(x: 0, y: 0, width: 30, height: 26) + layer.masksToBounds = true + layer.backgroundColor = backgroundColor.cgColor + } + } +} + diff --git a/iphone/Maps/Core/Theme/Renderers/UIButtonRenderer.swift b/iphone/Maps/Core/Theme/Renderers/UIButtonRenderer.swift new file mode 100644 index 0000000000..1838690cb7 --- /dev/null +++ b/iphone/Maps/Core/Theme/Renderers/UIButtonRenderer.swift @@ -0,0 +1,54 @@ +extension UIButton { + @objc override func applyTheme() { + for style in StyleManager.instance().getStyle(styleName) { + UIButtonRenderer.render(self, style: style) + } + } +} + +class UIButtonRenderer { + class func render(_ control: UIButton, style: Style) { + if let titleLabel = control.titleLabel { + if let font = style.font { + titleLabel.font = font + } + } + + if let fontColor = style.fontColor { + control.setTitleColor(fontColor, for: .normal) + } + + if let backgroundColor = style.backgroundColor { + control.setBackgroundImage(backgroundColor.getImage(), for: .normal) + control.backgroundColor = UIColor.clear + } + if let backgroundColorSelected = style.backgroundColorSelected { + control.setBackgroundImage(backgroundColorSelected.getImage(), for: .selected) + } + if let backgroundColorHighlighted = style.backgroundColorHighlighted { + control.setBackgroundImage(backgroundColorHighlighted.getImage(), for: .highlighted) + } + if let backgroundColorDisabled = style.backgroundColorDisabled { + control.setBackgroundImage(backgroundColorDisabled.getImage(), for: .disabled) + } + if let fontColorSelected = style.fontColorSelected { + control.setTitleColor(fontColorSelected, for: .selected) + } + if let fontColorHighlighted = style.fontColorHighlighted { + control.setTitleColor(fontColorHighlighted, for: .highlighted) + } + if let fontColorDisabled = style.fontColorDisabled { + control.setTitleColor(fontColorDisabled, for: .disabled) + } + if let image = style.image { + control.setImage(UIImage(named: image), for: .normal) + } + if let tintColor = style.tintColor { + control.tintColor = tintColor + } + + UIViewRenderer.renderBorder(control, style: style) + UIViewRenderer.renderShadow(control, style: style) + } +} + diff --git a/iphone/Maps/Core/Theme/Renderers/UIImageRenderer.swift b/iphone/Maps/Core/Theme/Renderers/UIImageRenderer.swift new file mode 100644 index 0000000000..d9755b02fa --- /dev/null +++ b/iphone/Maps/Core/Theme/Renderers/UIImageRenderer.swift @@ -0,0 +1,22 @@ +extension UIImageView { + @objc override func applyTheme() { + for style in StyleManager.instance().getStyle(styleName) { + UIViewRenderer.render(self, style: style) + UIImageViewRenderer.render(self, style: style) + } + } +} + +class UIImageViewRenderer { + class func render(_ control: UIImageView, style: Style) { + if let image = style.image { + control.image = UIImage(named: image) + } + if let tintColor = style.tintColor { + control.tintColor = tintColor + } + if let imageName = style.mwmImage { + control.mwm_name = imageName + } + } +} diff --git a/iphone/Maps/Core/Theme/Renderers/UILabelRenderer.swift b/iphone/Maps/Core/Theme/Renderers/UILabelRenderer.swift new file mode 100644 index 0000000000..8587c887a5 --- /dev/null +++ b/iphone/Maps/Core/Theme/Renderers/UILabelRenderer.swift @@ -0,0 +1,62 @@ +extension UILabel { + var isAttributed: Bool { + guard let attributedText = attributedText else { + return false + } + guard !attributedText.string.isEmpty else { + return false + } + var range = NSRange() + attributedText.attributes(at: 0, effectiveRange: &range) + return attributedText.string.count != range.length + } + + @objc override func applyTheme() { + let styles = StyleManager.instance().getStyle(styleName) + for style in styles { + UIViewRenderer.render(self, style: style) + UILabelRenderer.render(self, style: style) + } + } + + @objc func sw_setAttributedText(text: NSAttributedString) -> CGRect { + var attributedString = text + if styleName.isEmpty == false { + let styles = StyleManager.instance().getStyle(styleName) + for style in styles where style.attributes != nil { + attributedString = UILabelRenderer.transformText(style: style, + text: attributedString) + } + } + return self.sw_setAttributedText(text: attributedString) + } +} + +class UILabelRenderer { + class func render(_ control: UILabel, style: Style) { + if let font = style.font { + control.font = font + } + if let fontColor = style.fontColor { + control.textColor = fontColor + } + if let textAlignment = style.textAlignment { + control.textAlignment = textAlignment + } + if style.attributes != nil, + control.isAttributed, + let attributedText = control.attributedText { + control.attributedText = attributedText + } + } + + class func transformText(style: Style, text: NSAttributedString) -> NSAttributedString { + if let attributes = style.attributes, + attributes.isEmpty == false, + let attributedtext = text.mutableCopy() as? NSMutableAttributedString{ + attributedtext.setAttributes(attributes, range: NSRange(location: 0, length: attributedtext.length)); + return attributedtext + } + return text + } +} diff --git a/iphone/Maps/Core/Theme/Renderers/UINavigationBarRenderer.swift b/iphone/Maps/Core/Theme/Renderers/UINavigationBarRenderer.swift new file mode 100644 index 0000000000..4631e9ae9f --- /dev/null +++ b/iphone/Maps/Core/Theme/Renderers/UINavigationBarRenderer.swift @@ -0,0 +1,33 @@ +import UIKit + +extension UINavigationBar { + @objc override func applyTheme() { + if styleName.isEmpty { + styleName = "NavigationBar" + } + for style in StyleManager.instance().getStyle(styleName) { + UIViewRenderer.render(self, style: style) + UINavigationBarRenderer.render(self, style: style) + } + } +} + +class UINavigationBarRenderer { + class func render(_ control: UINavigationBar, style: Style) { + if let barTintColor = style.barTintColor { + control.barTintColor = barTintColor + } + if let shadowImage = style.shadowImage { + control.shadowImage = shadowImage + } + + var attributes = [NSAttributedString.Key: Any]() + if let font = style.font { + attributes[NSAttributedString.Key.font] = font + } + if let fontColor = style.fontColor { + attributes[NSAttributedString.Key.foregroundColor] = fontColor + } + control.titleTextAttributes = attributes + } +} diff --git a/iphone/Maps/Core/Theme/Renderers/UINavigationItemRenderer.swift b/iphone/Maps/Core/Theme/Renderers/UINavigationItemRenderer.swift new file mode 100644 index 0000000000..779d6cd1cf --- /dev/null +++ b/iphone/Maps/Core/Theme/Renderers/UINavigationItemRenderer.swift @@ -0,0 +1,20 @@ +import UIKit +extension UINavigationItem { + @objc func applyTheme() { + assertionFailure("Can't apply on non UIView") + } +} + +class UINavigationItemRenderer { + class func render(_ control: UINavigationItem, style: Style) { + if let item = control.backBarButtonItem { + UIBarButtonItemRenderer.render(item, style: style) + } + if let item = control.leftBarButtonItem { + UIBarButtonItemRenderer.render(item, style: style) + } + if let item = control.rightBarButtonItem { + UIBarButtonItemRenderer.render(item, style: style) + } + } +} diff --git a/iphone/Maps/Core/Theme/Renderers/UIPageControlRenderer.swift b/iphone/Maps/Core/Theme/Renderers/UIPageControlRenderer.swift new file mode 100644 index 0000000000..309b23a652 --- /dev/null +++ b/iphone/Maps/Core/Theme/Renderers/UIPageControlRenderer.swift @@ -0,0 +1,25 @@ +import UIKit +extension UIPageControl { + @objc override func applyTheme() { + if styleName.isEmpty { + styleName = "PageControl" + } + for style in StyleManager.instance().getStyle(styleName) { + UIPageControlenderer.render(self, style: style) + } + } +} + +class UIPageControlenderer { + class func render(_ control: UIPageControl, style: Style) { + if let backgroundColor = style.backgroundColor { + control.backgroundColor = backgroundColor + } + if let pageIndicatorTintColor = style.pageIndicatorTintColor { + control.pageIndicatorTintColor = pageIndicatorTintColor + } + if let currentPageIndicatorTintColor = style.currentPageIndicatorTintColor { + control.currentPageIndicatorTintColor = currentPageIndicatorTintColor + } + } +} diff --git a/iphone/Maps/Core/Theme/Renderers/UISearchBarRenderer.swift b/iphone/Maps/Core/Theme/Renderers/UISearchBarRenderer.swift new file mode 100644 index 0000000000..24d34f3e54 --- /dev/null +++ b/iphone/Maps/Core/Theme/Renderers/UISearchBarRenderer.swift @@ -0,0 +1,35 @@ +import Foundation +extension UISearchBar { + @objc override func applyTheme() { + if styleName.isEmpty { + styleName = "SearchBar" + } + for style in StyleManager.instance().getStyle(styleName) { + UIViewRenderer.render(self, style: style) + UISearchBarRenderer.render(self, style: style) + } + } +} + +class UISearchBarRenderer { + class func render(_ control: UISearchBar, style: Style) { + if let backgroundColor = style.backgroundColor { + control.searchTextField.backgroundColor = backgroundColor + } + if let barTintColor = style.barTintColor { + control.barTintColor = barTintColor + } + if let tintColor = style.tintColor { + control.tintColor = tintColor + if let image = control.searchTextField.leftView as? UIImageView { + image.tintColor = tintColor + } + } + if let font = style.font { + control.searchTextField.font = font + } + if let fontColor = style.fontColor { + control.searchTextField.textColor = fontColor + } + } +} diff --git a/iphone/Maps/Core/Theme/Renderers/UISwitchRenderer.swift b/iphone/Maps/Core/Theme/Renderers/UISwitchRenderer.swift new file mode 100644 index 0000000000..2506e33add --- /dev/null +++ b/iphone/Maps/Core/Theme/Renderers/UISwitchRenderer.swift @@ -0,0 +1,19 @@ +extension UISwitch { + @objc override func applyTheme() { + if styleName.isEmpty { + styleName = "Switch" + } + for style in StyleManager.instance().getStyle(styleName) { + UIViewRenderer.render(self, style: style) + UISwitchRenderer.render(self, style: style) + } + } +} + +class UISwitchRenderer { + class func render(_ control: UISwitch, style: Style) { + if let onTintColor = style.onTintColor { + control.onTintColor = onTintColor + } + } +} diff --git a/iphone/Maps/Core/Theme/Renderers/UITableViewCellRenderer.swift b/iphone/Maps/Core/Theme/Renderers/UITableViewCellRenderer.swift new file mode 100644 index 0000000000..1b38fd7b71 --- /dev/null +++ b/iphone/Maps/Core/Theme/Renderers/UITableViewCellRenderer.swift @@ -0,0 +1,39 @@ +extension UITableViewCell { + @objc override func applyTheme() { + if styleName.isEmpty { + styleName = "TableCell" + } + for style in StyleManager.instance().getStyle(styleName) { + UITableViewCellRenderer.render(self, style: style) + } + } +} + +class UITableViewCellRenderer { + class func render(_ control: UITableViewCell, style: Style) { + if let label = control.textLabel { + if let font = style.font { + label.font = font + } + if let fontColor = style.fontColor { + label.textColor = fontColor + } + } + if let detailedLabel = control.detailTextLabel { + if let fontDetailed = style.fontDetailed { + detailedLabel.font = fontDetailed + } + if let fontColorDetailed = style.fontColorDetailed { + detailedLabel.textColor = fontColorDetailed + } + } + if let tintColor = style.tintColor { + control.tintColor = tintColor + control.accessoryView?.tintColor = tintColor + } + if let backgroundColor = style.backgroundColor { + control.backgroundColor = backgroundColor + control.backgroundView = UIImageView(image: backgroundColor.getImage()) + } + } +} diff --git a/iphone/Maps/Core/Theme/Renderers/UITableViewHeaderFooterViewRenderer.swift b/iphone/Maps/Core/Theme/Renderers/UITableViewHeaderFooterViewRenderer.swift new file mode 100644 index 0000000000..1a2b9cc40f --- /dev/null +++ b/iphone/Maps/Core/Theme/Renderers/UITableViewHeaderFooterViewRenderer.swift @@ -0,0 +1,24 @@ +extension UITableViewHeaderFooterView { + @objc override func applyTheme() { + if styleName.isEmpty { + styleName = "TableViewHeaderFooterView" + } + for style in StyleManager.instance().getStyle(styleName) { + UITableViewHeaderFooterViewRenderer.render(self, style: style) + } + } +} + +class UITableViewHeaderFooterViewRenderer { + class func render(_ control: UITableViewHeaderFooterView, style: Style) { + if let backgroundColor = style.backgroundColor { + control.backgroundView = UIImageView(image: backgroundColor.getImage()) + } + if let font = style.font { + control.textLabel?.font = font + } + if let fontColor = style.fontColor { + control.textLabel?.textColor = fontColor + } + } +} diff --git a/iphone/Maps/Core/Theme/Renderers/UITableViewRenderer.swift b/iphone/Maps/Core/Theme/Renderers/UITableViewRenderer.swift new file mode 100644 index 0000000000..e3a1c89acc --- /dev/null +++ b/iphone/Maps/Core/Theme/Renderers/UITableViewRenderer.swift @@ -0,0 +1,24 @@ +extension UITableView { + @objc override func applyTheme() { + if styleName.isEmpty { + styleName = "TableView" + } + for style in StyleManager.instance().getStyle(styleName) { + UIViewRenderer.render(self, style: style) + UITableViewRenderer.render(self, style: style) + } + } +} + +class UITableViewRenderer { + class func render(_ control: UITableView, style: Style) { + if let backgroundColor = style.backgroundColor { + control.backgroundView = UIImageView(image: backgroundColor.getImage()) + } + if let separatorColor = style.separatorColor { + control.separatorColor = separatorColor + } + UIViewRenderer.renderBorder(control, style: style) + UIViewRenderer.renderShadow(control, style: style) + } +} diff --git a/iphone/Maps/Core/Theme/Renderers/UITextFieldRenderer.swift b/iphone/Maps/Core/Theme/Renderers/UITextFieldRenderer.swift new file mode 100644 index 0000000000..72f97d4b9a --- /dev/null +++ b/iphone/Maps/Core/Theme/Renderers/UITextFieldRenderer.swift @@ -0,0 +1,33 @@ +extension UITextField { + @objc override func applyTheme() { + for style in StyleManager.instance().getStyle(styleName) { + UITextFieldRenderer.render(self, style: style) + } + } + + @objc func sw_textRect(forBounds bounds: CGRect) -> CGRect { + if !isStyleApplied { + applyTheme() + } + isStyleApplied = true + return self.sw_textRect(forBounds: bounds) + } + + @objc func sw_editingRect(bounds: CGRect) -> CGRect { + return self.textRect(forBounds: bounds) + } +} + +class UITextFieldRenderer { + class func render(_ control: UITextField, style: Style) { + if let backgroundColor = style.backgroundColor { + control.backgroundColor = backgroundColor + } + if let font = style.font { + control.font = font + } + if let fontColor = style.fontColor { + control.textColor = fontColor + } + } +} diff --git a/iphone/Maps/Core/Theme/Renderers/UITextViewRenderer.swift b/iphone/Maps/Core/Theme/Renderers/UITextViewRenderer.swift new file mode 100644 index 0000000000..69c571afbc --- /dev/null +++ b/iphone/Maps/Core/Theme/Renderers/UITextViewRenderer.swift @@ -0,0 +1,27 @@ +extension UITextView { + @objc override func applyTheme() { + for style in StyleManager.instance().getStyle(styleName) { + UITextViewRenderer.render(self, style: style) + } + } +} + +class UITextViewRenderer { + class func render(_ control: UITextView, style: Style) { + if let backgroundColor = style.backgroundColor { + control.backgroundColor = backgroundColor + } + if let font = style.font { + control.font = font + } + if let fontColor = style.fontColor { + control.textColor = fontColor + } + if let textContainerInset = style.textContainerInset { + control.textContainerInset = textContainerInset + } + if let linkAttributes = style.linkAttributes { + control.linkTextAttributes = linkAttributes + } + } +} diff --git a/iphone/Maps/Core/Theme/Renderers/UIToolbarRenderer.swift b/iphone/Maps/Core/Theme/Renderers/UIToolbarRenderer.swift new file mode 100644 index 0000000000..3d7354a09b --- /dev/null +++ b/iphone/Maps/Core/Theme/Renderers/UIToolbarRenderer.swift @@ -0,0 +1,18 @@ +extension UIToolbar { + @objc override func applyTheme() { + for style in StyleManager.instance().getStyle(styleName) { + UIToolbarRenderer.render(self, style: style) + } + } +} + +class UIToolbarRenderer { + class func render(_ control: UIToolbar, style: Style) { + if let backgroundColor = style.backgroundColor { + control.setBackgroundImage(backgroundColor.getImage(), forToolbarPosition: .any, barMetrics: .default) + } + if let tintColor = style.tintColor { + control.tintColor = tintColor + } + } +} diff --git a/iphone/Maps/Core/Theme/Renderers/UIViewControllerRenderer.swift b/iphone/Maps/Core/Theme/Renderers/UIViewControllerRenderer.swift new file mode 100644 index 0000000000..c3f583226f --- /dev/null +++ b/iphone/Maps/Core/Theme/Renderers/UIViewControllerRenderer.swift @@ -0,0 +1,4 @@ +extension UIViewController { + @objc func applyTheme() { + } +} diff --git a/iphone/Maps/Core/Theme/Renderers/UIViewRenderer.swift b/iphone/Maps/Core/Theme/Renderers/UIViewRenderer.swift new file mode 100644 index 0000000000..5673a75dda --- /dev/null +++ b/iphone/Maps/Core/Theme/Renderers/UIViewRenderer.swift @@ -0,0 +1,57 @@ +extension UIView { + @objc func applyTheme() { + if type(of: self.superview) == UINavigationBar.self { + return; + } + for style in StyleManager.instance().getStyle(styleName) { + UIViewRenderer.render(self, style: style) + } + } +} + +class UIViewRenderer { + class func render(_ control: UIView, style: Style) { + if let backgroundColor = style.backgroundColor { + control.backgroundColor = backgroundColor + } + if let tintColor = style.tintColor { + control.tintColor = tintColor + } + + UIViewRenderer.renderShadow(control, style: style) + UIViewRenderer.renderBorder(control, style: style) + } + + class func renderShadow(_ control: UIView, style: Style) { + if let shadowColor = style.shadowColor { + control.layer.shadowColor = shadowColor.cgColor + } + if let shadowOffset = style.shadowOffset { + control.layer.shadowOffset = shadowOffset + } + if let shadowOpacity = style.shadowOpacity { + control.layer.shadowOpacity = shadowOpacity + } + if let shadowRadius = style.shadowRadius { + control.layer.shadowRadius = shadowRadius + } + } + + class func renderBorder(_ control: UIView, style: Style) { + if let borderColor = style.borderColor { + control.layer.borderColor = borderColor.cgColor + } + if let borderWidth = style.borderWidth { + control.layer.borderWidth = borderWidth + } + if let cornerRadius = style.cornerRadius { + control.layer.cornerRadius = cornerRadius + } + if let clip = style.clip { + control.clipsToBounds = clip + } + if let round = style.round, round == true { + control.layer.cornerRadius = control.size.height / 2 + } + } +} diff --git a/iphone/Maps/Core/Theme/Renderers/UIWindowRenderer.swift b/iphone/Maps/Core/Theme/Renderers/UIWindowRenderer.swift new file mode 100644 index 0000000000..319b9b7a42 --- /dev/null +++ b/iphone/Maps/Core/Theme/Renderers/UIWindowRenderer.swift @@ -0,0 +1,21 @@ +extension UIWindow { + @objc override func applyTheme() { + for style in StyleManager.instance().getStyle(styleName) { + UIViewRenderer.render(self, style: style) + UIWindowRenderer.render(self, style: style) + } + } + @objc func sw_becomeKeyWindow() { + if !isStyleApplied { + self.applyTheme() + } + self.isStyleApplied = true + self.sw_becomeKeyWindow(); + } +} + +class UIWindowRenderer { + class func render(_ control: UIView, style: Style) { + + } +} diff --git a/iphone/Maps/Core/Theme/SearchStyleSheet.swift b/iphone/Maps/Core/Theme/SearchStyleSheet.swift new file mode 100644 index 0000000000..e659383f7b --- /dev/null +++ b/iphone/Maps/Core/Theme/SearchStyleSheet.swift @@ -0,0 +1,106 @@ +class SearchStyleSheet: IStyleSheet { + static func register(theme: Theme, colors: IColors, fonts: IFonts) { + theme.add(styleName: "SearchInstallButton") { (s) -> (Void) in + s.cornerRadius = 10 + s.clip = true + s.font = fonts.medium12 + s.fontColor = colors.blackSecondaryText + s.backgroundColor = colors.bannerBackground + } + + theme.add(styleName: "SearchBanner") { (s) -> (Void) in + s.backgroundColor = colors.bannerBackground + } + + theme.add(styleName: "SearchClosedBackground") { (s) -> (Void) in + s.cornerRadius = 4 + s.backgroundColor = colors.blackHintText + } + + theme.add(styleName: "SearchPopularView") { (s) -> (Void) in + s.cornerRadius = 10 + s.backgroundColor = colors.linkBlueHighlighted + } + + theme.add(styleName: "SearchSideAvaliableMarker") { (s) -> (Void) in + s.backgroundColor = colors.ratingGreen + } + + theme.add(styleName: "SearchBarView") { (s) -> (Void) in + s.backgroundColor = colors.primary + s.shadowRadius = 2 + s.shadowColor = UIColor(0,0,0, alpha26) + s.shadowOpacity = 1 + s.shadowOffset = CGSize.zero + } + + theme.add(styleName: "SearchFilterButtonActive") { (s) -> (Void) in + s.backgroundColor = colors.linkBlue + s.backgroundColorHighlighted = colors.linkBlueHighlighted + s.fontColor = colors.white + s.cornerRadius = 4 + s.font = fonts.regular17 + } + + theme.add(styleName: "SearchFilterButtonInActive") { (s) -> (Void) in + s.backgroundColor = colors.clear + s.backgroundColorHighlighted = colors.clear + s.fontColor = colors.linkBlue + s.cornerRadius = 4 + s.font = fonts.regular17 + } + + theme.add(styleName: "SearchCancelButtonActive") { (s) -> (Void) in + s.tintColor = colors.white + s.image = "ic_clear_filters" + s.coloring = MWMButtonColoring.white + } + + theme.add(styleName: "SearchCancelButtonInActive") { (s) -> (Void) in + s.tintColor = colors.linkBlueHighlighted + s.image = "ic_filter" + s.coloring = MWMButtonColoring.blue + } + + theme.add(styleName: "SearchChangeModeView") { (s) -> (Void) in + s.backgroundColor = colors.pressBackground + s.shadowRadius = 2 + s.shadowColor = UIColor(0, 0, 0, 0.24); + s.shadowOffset = CGSize.zero + s.shadowOpacity = 1 + } + + theme.add(styleName: "SearchSearchTextField") { (s) -> (Void) in + s.fontColor = colors.blackSecondaryText + s.backgroundColor = colors.white + } + + theme.add(styleName: "SearchSearchTextFieldIcon") { (s) -> (Void) in + s.tintColor = colors.blackSecondaryText + s.color = colors.blackSecondaryText + } + + theme.add(styleName: "FilterRatingButton") { (s) -> (Void) in + s.cornerRadius = 4 + s.borderWidth = 1 + s.borderColor = colors.blackDividers + } + + theme.add(styleName: "SearchFilterTypeCell") { (s) -> (Void) in + s.cornerRadius = 16 + s.borderColor = colors.blackDividers + s.borderWidth = 1 + } + + theme.add(styleName: "FilterCheckButton") { (s) -> (Void) in + s.fontColor = colors.blackPrimaryText + s.fontColorDisabled = colors.blackDividers + s.backgroundColor = colors.white + s.font = fonts.regular14 + s.cornerRadius = 4 + s.borderWidth = 1 + s.borderColor = colors.blackDividers + s.textAlignment = .natural + } + } +} diff --git a/iphone/Maps/Core/Theme/SubscriptionsStyleSheet.swift b/iphone/Maps/Core/Theme/SubscriptionsStyleSheet.swift new file mode 100644 index 0000000000..b8cad83cb9 --- /dev/null +++ b/iphone/Maps/Core/Theme/SubscriptionsStyleSheet.swift @@ -0,0 +1,110 @@ +class SubscriptionsStyleSheet: IStyleSheet { + static func register(theme: Theme, colors: IColors, fonts: IFonts) { + theme.add(styleName: "BookmarkSubscriptionScrollBackground") { (s) -> (Void) in + s.backgroundColor = colors.bookmarkSubscriptionScrollBackground + } + + theme.add(styleName: "BookmarkSubscriptionBackground") { (s) -> (Void) in + s.backgroundColor = colors.bookmarkSubscriptionBackground + } + + theme.add(styleName: "BookmarkSubscriptionFooterBackground") { (s) -> (Void) in + s.backgroundColor = colors.bookmarkSubscriptionFooterBackground + } + + theme.add(styleName: "BookmarksSubscriptionMonthlyButton") { (s) -> (Void) in + s.font = fonts.medium14 + s.fontColor = colors.blackHintText + s.borderWidth = 1 + s.cornerRadius = 6 + s.borderColor = colors.blackHintText + s.backgroundColorHighlighted = colors.blackDividers + } + + theme.add(styleName: "BookmarksSubscriptionDiscount", forType: .dark) { (s) -> (Void) in + s.backgroundColor = colors.discountBackground + s.cornerRadius = 6 + s.shadowRadius = 4 + s.shadowOffset = CGSize(width: 0, height: 2) + s.shadowColor = colors.blackHintText + s.shadowOpacity = 0.62 + s.fontColor = UIColor.white + s.font = fonts.bold17 + } + + theme.add(styleName: "BookmarksSubscriptionDiscount", forType: .light) { (s) -> (Void) in + s.backgroundColor = colors.discountBackground + s.cornerRadius = 6 + s.fontColor = UIColor.white + s.font = fonts.bold17 + } + + theme.add(styleName: "AllPassSubscriptionYearlyButton") { (s) -> (Void) in + s.fontColorHighlighted = colors.white + s.font = fonts.medium14 + s.cornerRadius = 6 + s.fontColor = colors.allPassSubscriptionDescription + s.backgroundColor = colors.allPassSubscriptionSubTitle + s.backgroundColorHighlighted = colors.linkBlueHighlighted + } + + theme.add(styleName: "AllPassSubscriptionMonthlyButton") { (s) -> (Void) in + s.fontColorHighlighted = colors.white + s.font = fonts.medium14 + s.fontColor = colors.allPassSubscriptionMonthlyTitle + s.cornerRadius = 6 + s.borderWidth = 1 + s.borderColor = colors.blackHintText + s.backgroundColorHighlighted = colors.blackDividers + s.backgroundColor = colors.allPassSubscriptionMonthlyBackground + } + + theme.add(styleName: "AllPassSubscriptionRestoreButton") { (s) -> (Void) in + s.font = fonts.medium14 + s.fontColor = colors.allPassSubscriptionDescription + s.fontColorHighlighted = colors.linkBlueHighlighted + } + + theme.add(styleName: "AllPassSubscriptionTerms") { (s) -> (Void) in + s.font = fonts.regular9 + s.fontColor = colors.allPassSubscriptionTermsTitle + } + + theme.add(styleName: "AllPassSubscriptionTermsButton") { (s) -> (Void) in + s.font = fonts.regular9 + s.fontColor = colors.allPassSubscriptionTermsTitle + } + + theme.add(styleName: "AllPassSubscriptionTitle") { (s) -> (Void) in + s.font = fonts.medium10 + s.fontColor = colors.allPassSubscriptionTermsTitle + s.fontColorHighlighted = colors.blackHintText + } + + theme.add(styleName: "AllPassSubscriptionSubTitle") { (s) -> (Void) in + s.font = fonts.fredokaRegular25 + s.fontColor = colors.allPassSubscriptionSubTitle + } + + theme.add(styleName: "AllPassSubscriptionDescription1") { (s) -> (Void) in + s.font = fonts.bold34 + s.fontColor = colors.allPassSubscriptionDescription + } + + theme.add(styleName: "AllPassSubscriptionDescription2") { (s) -> (Void) in + s.font = fonts.medium18 + s.fontColor = colors.allPassSubscriptionDescription + } + + theme.add(styleName: "AllPassSubscriptionDiscount") { (s) -> (Void) in + s.shadowRadius = 4 + s.shadowOffset = CGSize(width: 0, height: 2) + s.shadowColor = colors.blackHintText + s.shadowOpacity = 0.62 + s.cornerRadius = 6 + s.font = fonts.bold17 + s.fontColor = colors.discountText + s.backgroundColor = colors.allPassSubscriptionDiscountBackground + } + } +} diff --git a/iphone/Maps/Maps.xcodeproj/project.pbxproj b/iphone/Maps/Maps.xcodeproj/project.pbxproj index 732bfffd93..3a9b215a5a 100644 --- a/iphone/Maps/Maps.xcodeproj/project.pbxproj +++ b/iphone/Maps/Maps.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 1185C52C23BB53A7004BF349 /* UIViewControllerRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1185C52B23BB53A7004BF349 /* UIViewControllerRenderer.swift */; }; 1DA7908820762CEB008BDD6B /* libopen_location_code.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DA7908920762CEB008BDD6B /* libopen_location_code.a */; }; 1DFA2F6A20D3B57400FB2C66 /* UIColor+PartnerColor.m in Sources */ = {isa = PBXBuildFile; fileRef = 1DFA2F6920D3B57400FB2C66 /* UIColor+PartnerColor.m */; }; 3304306D21D4EAFB00317CA3 /* SearchCategoryCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3304306C21D4EAFB00317CA3 /* SearchCategoryCell.swift */; }; @@ -102,22 +103,18 @@ 344BEAF31F66BDC30045DC45 /* RatingSummaryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 344BEAF01F66BDC30045DC45 /* RatingSummaryView.swift */; }; 344BEAF61F66BDC30045DC45 /* RatingSummaryViewSettings.swift in Sources */ = {isa = PBXBuildFile; fileRef = 344BEAF11F66BDC30045DC45 /* RatingSummaryViewSettings.swift */; }; 344D63181E795A3C006F17CB /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 344D63161E795A2D006F17CB /* SystemConfiguration.framework */; }; - 3454D7B91E07F045004AF2AD /* CALayer+RuntimeAttributes.m in Sources */ = {isa = PBXBuildFile; fileRef = 3454D79A1E07F045004AF2AD /* CALayer+RuntimeAttributes.m */; }; 3454D7BC1E07F045004AF2AD /* CLLocation+Mercator.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3454D79C1E07F045004AF2AD /* CLLocation+Mercator.mm */; }; 3454D7BF1E07F045004AF2AD /* DateComponentsFormatter+ETA.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3454D79D1E07F045004AF2AD /* DateComponentsFormatter+ETA.swift */; }; 3454D7C21E07F045004AF2AD /* NSString+Categories.m in Sources */ = {isa = PBXBuildFile; fileRef = 3454D79F1E07F045004AF2AD /* NSString+Categories.m */; }; 3454D7C51E07F045004AF2AD /* UIButton+Orientation.m in Sources */ = {isa = PBXBuildFile; fileRef = 3454D7A11E07F045004AF2AD /* UIButton+Orientation.m */; }; - 3454D7C81E07F045004AF2AD /* UIButton+RuntimeAttributes.m in Sources */ = {isa = PBXBuildFile; fileRef = 3454D7A31E07F045004AF2AD /* UIButton+RuntimeAttributes.m */; }; 3454D7CB1E07F045004AF2AD /* UIColor+MapsMeColor.m in Sources */ = {isa = PBXBuildFile; fileRef = 3454D7A51E07F045004AF2AD /* UIColor+MapsMeColor.m */; }; 3454D7CE1E07F045004AF2AD /* UIFont+MapsMeFonts.m in Sources */ = {isa = PBXBuildFile; fileRef = 3454D7A71E07F045004AF2AD /* UIFont+MapsMeFonts.m */; }; 3454D7D11E07F045004AF2AD /* UIImage+RGBAData.m in Sources */ = {isa = PBXBuildFile; fileRef = 3454D7A91E07F045004AF2AD /* UIImage+RGBAData.m */; }; 3454D7D41E07F045004AF2AD /* UIImageView+Coloring.m in Sources */ = {isa = PBXBuildFile; fileRef = 3454D7AB1E07F045004AF2AD /* UIImageView+Coloring.m */; }; 3454D7D71E07F045004AF2AD /* UIKitCategories.m in Sources */ = {isa = PBXBuildFile; fileRef = 3454D7AD1E07F045004AF2AD /* UIKitCategories.m */; }; 3454D7DA1E07F045004AF2AD /* UILabel+RuntimeAttributes.m in Sources */ = {isa = PBXBuildFile; fileRef = 3454D7AF1E07F045004AF2AD /* UILabel+RuntimeAttributes.m */; }; - 3454D7DD1E07F045004AF2AD /* UISwitch+RuntimeAttributes.m in Sources */ = {isa = PBXBuildFile; fileRef = 3454D7B11E07F045004AF2AD /* UISwitch+RuntimeAttributes.m */; }; 3454D7E01E07F045004AF2AD /* UITextField+RuntimeAttributes.m in Sources */ = {isa = PBXBuildFile; fileRef = 3454D7B31E07F045004AF2AD /* UITextField+RuntimeAttributes.m */; }; 3454D7E31E07F045004AF2AD /* UITextView+RuntimeAttributes.m in Sources */ = {isa = PBXBuildFile; fileRef = 3454D7B51E07F045004AF2AD /* UITextView+RuntimeAttributes.m */; }; - 3454D7E61E07F045004AF2AD /* UIView+RuntimeAttributes.m in Sources */ = {isa = PBXBuildFile; fileRef = 3454D7B71E07F045004AF2AD /* UIView+RuntimeAttributes.m */; }; 34574A671E3B85F80061E839 /* ThemeManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34574A651E3B85F80061E839 /* ThemeManager.swift */; }; 3457C4261F680F1900028233 /* String+BoundingRect.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3457C4241F680F1900028233 /* String+BoundingRect.swift */; }; 345C2F8A1F86361B009DB8B4 /* MWMUGCViewModel.mm in Sources */ = {isa = PBXBuildFile; fileRef = 345C2F881F86361B009DB8B4 /* MWMUGCViewModel.mm */; }; @@ -561,12 +558,18 @@ 67B78B551E42333C0018E590 /* AdSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 67B78B541E42333C0018E590 /* AdSupport.framework */; }; 6B9978361C89A316003B8AA0 /* editor.config in Resources */ = {isa = PBXBuildFile; fileRef = 6B9978341C89A316003B8AA0 /* editor.config */; }; 7BD07E4A8D71CA41F082BEC7 /* Pods_MAPS_ME.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 58E5736C23FC4E77509C9946 /* Pods_MAPS_ME.framework */; }; + 99169D7323D06B390006A9CA /* RatingSummaryViewRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99169D7223D06B390006A9CA /* RatingSummaryViewRenderer.swift */; }; 9917D17D2396793A00A7E06E /* PaidRoutesSubscriptionCampaign.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9917D17C2396793A00A7E06E /* PaidRoutesSubscriptionCampaign.swift */; }; 9917D17F2397B1D600A7E06E /* IPadModalPresentationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9917D17E2397B1D600A7E06E /* IPadModalPresentationController.swift */; }; 991CE2BF2371D349009EB02A /* PromoCampaignManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 991CE2BA2371D349009EB02A /* PromoCampaignManager.swift */; }; 991CE2C02371D349009EB02A /* PromoCampaign.swift in Sources */ = {isa = PBXBuildFile; fileRef = 991CE2BB2371D349009EB02A /* PromoCampaign.swift */; }; 991CE2C22371D349009EB02A /* PromoDiscoveryCampaign.swift in Sources */ = {isa = PBXBuildFile; fileRef = 991CE2BE2371D349009EB02A /* PromoDiscoveryCampaign.swift */; }; 991CE2DD2373145C009EB02A /* PromoAfterBookingCampaign.swift in Sources */ = {isa = PBXBuildFile; fileRef = 991CE2DC2373145C009EB02A /* PromoAfterBookingCampaign.swift */; }; + 991FCA1E23AD0A73009AD684 /* MWMButtonRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 991FCA1D23AD0A73009AD684 /* MWMButtonRenderer.swift */; }; + 991FCA2023B0FF33009AD684 /* AdsStyleSheet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 991FCA1F23B0FF33009AD684 /* AdsStyleSheet.swift */; }; + 991FCA2423B11E61009AD684 /* BookmarksStyleSheet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 991FCA2323B11E61009AD684 /* BookmarksStyleSheet.swift */; }; + 991FCA2623B11EDE009AD684 /* UITextViewRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 991FCA2523B11EDE009AD684 /* UITextViewRenderer.swift */; }; + 991FCA2823B12201009AD684 /* CheckmarkRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 991FCA2723B12201009AD684 /* CheckmarkRenderer.swift */; }; 993F5507237C622700545511 /* DeepLinkSearchStrategy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 993F54F8237C622700545511 /* DeepLinkSearchStrategy.swift */; }; 993F5508237C622700545511 /* DeepLinkRouteStrategyAdapter.mm in Sources */ = {isa = PBXBuildFile; fileRef = 993F54F9237C622700545511 /* DeepLinkRouteStrategyAdapter.mm */; }; 993F5509237C622700545511 /* DeepLinkHandlerStrategy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 993F54FA237C622700545511 /* DeepLinkHandlerStrategy.swift */; }; @@ -583,6 +586,30 @@ 993F5514237C622700545511 /* DeepLinkStrategyFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 993F5506237C622700545511 /* DeepLinkStrategyFactory.swift */; }; 99425AF4236855BB00D005C0 /* PromoDiscoveryRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99425AF3236855BB00D005C0 /* PromoDiscoveryRouter.swift */; }; 99425AFC23685F1E00D005C0 /* PromoDiscoveryPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99425AFB23685F1E00D005C0 /* PromoDiscoveryPresenter.swift */; }; + 994AEC0E23AB763C0079B81F /* Colors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 994AEBE423AB763C0079B81F /* Colors.swift */; }; + 994AEC0F23AB763C0079B81F /* UISwitchRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 994AEBE623AB763C0079B81F /* UISwitchRenderer.swift */; }; + 994AEC1323AB763C0079B81F /* UIButtonRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 994AEBEA23AB763C0079B81F /* UIButtonRenderer.swift */; }; + 994AEC1423AB763C0079B81F /* UIActivityIndicatorRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 994AEBEB23AB763C0079B81F /* UIActivityIndicatorRenderer.swift */; }; + 994AEC1523AB763C0079B81F /* UILabelRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 994AEBEC23AB763C0079B81F /* UILabelRenderer.swift */; }; + 994AEC1723AB763C0079B81F /* UIImageRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 994AEBEE23AB763C0079B81F /* UIImageRenderer.swift */; }; + 994AEC1823AB763C0079B81F /* UITableViewRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 994AEBEF23AB763C0079B81F /* UITableViewRenderer.swift */; }; + 994AEC1C23AB763C0079B81F /* UIWindowRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 994AEBF323AB763C0079B81F /* UIWindowRenderer.swift */; }; + 994AEC1D23AB763C0079B81F /* UINavigationBarRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 994AEBF423AB763C0079B81F /* UINavigationBarRenderer.swift */; }; + 994AEC1F23AB763C0079B81F /* UITextFieldRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 994AEBF623AB763C0079B81F /* UITextFieldRenderer.swift */; }; + 994AEC2023AB763C0079B81F /* UIBarButtonItemRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 994AEBF723AB763C0079B81F /* UIBarButtonItemRenderer.swift */; }; + 994AEC2123AB763C0079B81F /* UIViewRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 994AEBF823AB763C0079B81F /* UIViewRenderer.swift */; }; + 994AEC2523AB763C0079B81F /* UITableViewCellRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 994AEBFC23AB763C0079B81F /* UITableViewCellRenderer.swift */; }; + 994AEC2623AB763C0079B81F /* UINavigationItemRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 994AEBFD23AB763C0079B81F /* UINavigationItemRenderer.swift */; }; + 994AEC2723AB763C0079B81F /* MainTheme.swift in Sources */ = {isa = PBXBuildFile; fileRef = 994AEBFE23AB763C0079B81F /* MainTheme.swift */; }; + 994AEC2823AB763C0079B81F /* UIView+styleName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 994AEC0023AB763C0079B81F /* UIView+styleName.swift */; }; + 994AEC2923AB763C0079B81F /* UIColor+rgba.swift in Sources */ = {isa = PBXBuildFile; fileRef = 994AEC0323AB763C0079B81F /* UIColor+rgba.swift */; }; + 994AEC2A23AB763C0079B81F /* UIColor+image.swift in Sources */ = {isa = PBXBuildFile; fileRef = 994AEC0423AB763C0079B81F /* UIColor+image.swift */; }; + 994AEC2B23AB763C0079B81F /* SwizzleStyle.m in Sources */ = {isa = PBXBuildFile; fileRef = 994AEC0523AB763C0079B81F /* SwizzleStyle.m */; }; + 994AEC2C23AB763C0079B81F /* IColors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 994AEC0723AB763C0079B81F /* IColors.swift */; }; + 994AEC2D23AB763C0079B81F /* StyleManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 994AEC0823AB763C0079B81F /* StyleManager.swift */; }; + 994AEC2E23AB763C0079B81F /* Style.swift in Sources */ = {isa = PBXBuildFile; fileRef = 994AEC0923AB763C0079B81F /* Style.swift */; }; + 994AEC2F23AB763C0079B81F /* Theme.swift in Sources */ = {isa = PBXBuildFile; fileRef = 994AEC0A23AB763C0079B81F /* Theme.swift */; }; + 994AEC3423AB7B410079B81F /* DiscoveryStyleSheet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 994AEC3323AB7B410079B81F /* DiscoveryStyleSheet.swift */; }; 99536111235DABB1008B218F /* BaseSubscriptionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99536110235DABB1008B218F /* BaseSubscriptionViewController.swift */; }; 99536113235DB86C008B218F /* BookmarksSubscriptionDiscountLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99536112235DB86C008B218F /* BookmarksSubscriptionDiscountLabel.swift */; }; 995738DB235484410019AEE7 /* AllPassSubscriptionViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 995738DA235484410019AEE7 /* AllPassSubscriptionViewController.xib */; }; @@ -590,6 +617,17 @@ 995739062355CAC40019AEE7 /* ImageViewCrossDisolve.swift in Sources */ = {isa = PBXBuildFile; fileRef = 995739052355CAC40019AEE7 /* ImageViewCrossDisolve.swift */; }; 995739082355CB660019AEE7 /* AllPassSubscriptionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 995739072355CB660019AEE7 /* AllPassSubscriptionViewController.swift */; }; 999D3A67237BFA4600C5F7A8 /* SubscriptionViewBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 999D3A66237BFA4600C5F7A8 /* SubscriptionViewBuilder.swift */; }; + 999FC12023ABA9AD00B0E6F9 /* SearchStyleSheet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 999FC11F23ABA9AD00B0E6F9 /* SearchStyleSheet.swift */; }; + 999FC12223ABABA000B0E6F9 /* IFonts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 999FC12123ABABA000B0E6F9 /* IFonts.swift */; }; + 999FC12423ABACED00B0E6F9 /* Fonts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 999FC12323ABACED00B0E6F9 /* Fonts.swift */; }; + 999FC12723ABAF6800B0E6F9 /* IStyleSheet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 999FC12623ABAF6800B0E6F9 /* IStyleSheet.swift */; }; + 999FC12923ABAFFE00B0E6F9 /* GlobalStyleSheet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 999FC12823ABAFFE00B0E6F9 /* GlobalStyleSheet.swift */; }; + 999FC12B23ABB4B800B0E6F9 /* FontStyleSheet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 999FC12A23ABB4B800B0E6F9 /* FontStyleSheet.swift */; }; + 999FC12F23ABD53300B0E6F9 /* TabViewRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 999FC12E23ABD53300B0E6F9 /* TabViewRenderer.swift */; }; + 99A614C923BA399D00D8D8D0 /* SubscriptionsStyleSheet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99A614C823BA399D00D8D8D0 /* SubscriptionsStyleSheet.swift */; }; + 99A614D523C8911A00D8D8D0 /* AuthStyleSheet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99A614D423C8911A00D8D8D0 /* AuthStyleSheet.swift */; }; + 99A614D723C8B5F200D8D8D0 /* UIPageControlRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99A614D623C8B5F200D8D8D0 /* UIPageControlRenderer.swift */; }; + 99A614E423CDD1D900D8D8D0 /* UIButton+RuntimeAttributes.m in Sources */ = {isa = PBXBuildFile; fileRef = 99A614E323CDD1D900D8D8D0 /* UIButton+RuntimeAttributes.m */; }; 99B6A74C2362F5AA002C94CB /* PromoButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99B6A74B2362F5AA002C94CB /* PromoButton.swift */; }; 99B6A74E2362F5CD002C94CB /* PromoCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99B6A74D2362F5CD002C94CB /* PromoCoordinator.swift */; }; 99B6A77F23684573002C94CB /* PromoDiscoveryBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99B6A77E23684573002C94CB /* PromoDiscoveryBuilder.swift */; }; @@ -612,6 +650,11 @@ 99E2B0122368A8C700FFABC5 /* MWMCategory+PlacesCountTitle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99E2B0112368A8C700FFABC5 /* MWMCategory+PlacesCountTitle.swift */; }; 99E2B01E23698B0800FFABC5 /* WelcomeProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99E2B01D23698B0800FFABC5 /* WelcomeProtocols.swift */; }; 99E2B0232369904800FFABC5 /* WelcomeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99E2B0222369904800FFABC5 /* WelcomeViewController.swift */; }; + 99F50FC323B23F0400E95228 /* UISearchBarRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99F50FC223B23F0400E95228 /* UISearchBarRenderer.swift */; }; + 99F50FC523B26DCB00E95228 /* UITableViewHeaderFooterViewRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99F50FC423B26DCB00E95228 /* UITableViewHeaderFooterViewRenderer.swift */; }; + 99F50FC823B273F800E95228 /* MWMTableViewCellRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99F50FC723B273F800E95228 /* MWMTableViewCellRenderer.swift */; }; + 99F50FCA23B3852F00E95228 /* UIToolbarRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99F50FC923B3852F00E95228 /* UIToolbarRenderer.swift */; }; + 99F8B4C623B644A6009FF0B4 /* MapStyleSheet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99F8B4C523B644A6009FF0B4 /* MapStyleSheet.swift */; }; A630D1EA207CA95900976DEA /* Localizable.stringsdict in Resources */ = {isa = PBXBuildFile; fileRef = A630D1E8207CA95900976DEA /* Localizable.stringsdict */; }; B32FE74020D2844600EF7446 /* DownloadedBookmarksViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B32FE73E20D2844600EF7446 /* DownloadedBookmarksViewController.swift */; }; B32FE74120D2844600EF7446 /* DownloadedBookmarksViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = B32FE73F20D2844600EF7446 /* DownloadedBookmarksViewController.xib */; }; @@ -692,7 +735,6 @@ F653CE0E1C6DEB2E00A453F1 /* MWMDropDown.xib in Resources */ = {isa = PBXBuildFile; fileRef = F652B2E91C6DE8E500D20C8C /* MWMDropDown.xib */; }; F653CE121C6DEC8E00A453F1 /* MWMDropDown.m in Sources */ = {isa = PBXBuildFile; fileRef = F653CE101C6DEB5A00A453F1 /* MWMDropDown.m */; }; F653CE191C71F62700A453F1 /* MWMAddPlaceNavigationBar.mm in Sources */ = {isa = PBXBuildFile; fileRef = F653CE151C71F60200A453F1 /* MWMAddPlaceNavigationBar.mm */; }; - F6550C1F1FD81B3800352D88 /* RatingSummaryView+DefaultConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6550C1D1FD81B3800352D88 /* RatingSummaryView+DefaultConfig.swift */; }; F655C027207278300048A241 /* DiscoveryMoreCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F655C026207278300048A241 /* DiscoveryMoreCell.swift */; }; F655C02920727A630048A241 /* DiscoveryMoreCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F655C02820727A630048A241 /* DiscoveryMoreCell.xib */; }; F65D1E1A20E4F11600FE31DD /* ugc_migration in Resources */ = {isa = PBXBuildFile; fileRef = F65D1E1920E4F11600FE31DD /* ugc_migration */; }; @@ -819,6 +861,7 @@ /* Begin PBXFileReference section */ 0B07BBB5C2EFC6F60EF51BC8 /* Pods-MAPS.ME.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MAPS.ME.debug.xcconfig"; path = "Target Support Files/Pods-MAPS.ME/Pods-MAPS.ME.debug.xcconfig"; sourceTree = ""; }; + 1185C52B23BB53A7004BF349 /* UIViewControllerRenderer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIViewControllerRenderer.swift; sourceTree = ""; }; 166595280BE641CF8ADE2209 /* Pods-MAPS.ME.production full.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MAPS.ME.production full.xcconfig"; path = "Target Support Files/Pods-MAPS.ME/Pods-MAPS.ME.production full.xcconfig"; sourceTree = ""; }; 1D3623240D0F684500981E51 /* MapsAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MapsAppDelegate.h; sourceTree = ""; }; 1D3623250D0F684500981E51 /* MapsAppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MapsAppDelegate.mm; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; @@ -961,8 +1004,6 @@ 344BEAF11F66BDC30045DC45 /* RatingSummaryViewSettings.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RatingSummaryViewSettings.swift; sourceTree = ""; }; 344D63161E795A2D006F17CB /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; 345050211E028B8000A8DC59 /* Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Bridging-Header.h"; sourceTree = ""; }; - 3454D7991E07F045004AF2AD /* CALayer+RuntimeAttributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CALayer+RuntimeAttributes.h"; sourceTree = ""; }; - 3454D79A1E07F045004AF2AD /* CALayer+RuntimeAttributes.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "CALayer+RuntimeAttributes.m"; sourceTree = ""; }; 3454D79B1E07F045004AF2AD /* CLLocation+Mercator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CLLocation+Mercator.h"; sourceTree = ""; }; 3454D79C1E07F045004AF2AD /* CLLocation+Mercator.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "CLLocation+Mercator.mm"; sourceTree = ""; }; 3454D79D1E07F045004AF2AD /* DateComponentsFormatter+ETA.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "DateComponentsFormatter+ETA.swift"; sourceTree = ""; }; @@ -970,8 +1011,6 @@ 3454D79F1E07F045004AF2AD /* NSString+Categories.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+Categories.m"; sourceTree = ""; }; 3454D7A01E07F045004AF2AD /* UIButton+Orientation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIButton+Orientation.h"; sourceTree = ""; }; 3454D7A11E07F045004AF2AD /* UIButton+Orientation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIButton+Orientation.m"; sourceTree = ""; }; - 3454D7A21E07F045004AF2AD /* UIButton+RuntimeAttributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIButton+RuntimeAttributes.h"; sourceTree = ""; }; - 3454D7A31E07F045004AF2AD /* UIButton+RuntimeAttributes.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIButton+RuntimeAttributes.m"; sourceTree = ""; }; 3454D7A41E07F045004AF2AD /* UIColor+MapsMeColor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIColor+MapsMeColor.h"; sourceTree = ""; }; 3454D7A51E07F045004AF2AD /* UIColor+MapsMeColor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = "UIColor+MapsMeColor.m"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 3454D7A61E07F045004AF2AD /* UIFont+MapsMeFonts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIFont+MapsMeFonts.h"; sourceTree = ""; }; @@ -984,14 +1023,10 @@ 3454D7AD1E07F045004AF2AD /* UIKitCategories.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = UIKitCategories.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 3454D7AE1E07F045004AF2AD /* UILabel+RuntimeAttributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UILabel+RuntimeAttributes.h"; sourceTree = ""; }; 3454D7AF1E07F045004AF2AD /* UILabel+RuntimeAttributes.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UILabel+RuntimeAttributes.m"; sourceTree = ""; }; - 3454D7B01E07F045004AF2AD /* UISwitch+RuntimeAttributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UISwitch+RuntimeAttributes.h"; sourceTree = ""; }; - 3454D7B11E07F045004AF2AD /* UISwitch+RuntimeAttributes.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UISwitch+RuntimeAttributes.m"; sourceTree = ""; }; 3454D7B21E07F045004AF2AD /* UITextField+RuntimeAttributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UITextField+RuntimeAttributes.h"; sourceTree = ""; }; 3454D7B31E07F045004AF2AD /* UITextField+RuntimeAttributes.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UITextField+RuntimeAttributes.m"; sourceTree = ""; }; 3454D7B41E07F045004AF2AD /* UITextView+RuntimeAttributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UITextView+RuntimeAttributes.h"; sourceTree = ""; }; 3454D7B51E07F045004AF2AD /* UITextView+RuntimeAttributes.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UITextView+RuntimeAttributes.m"; sourceTree = ""; }; - 3454D7B61E07F045004AF2AD /* UIView+RuntimeAttributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+RuntimeAttributes.h"; sourceTree = ""; }; - 3454D7B71E07F045004AF2AD /* UIView+RuntimeAttributes.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+RuntimeAttributes.m"; sourceTree = ""; }; 34570A3A1B13222600E6D4FD /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; }; 34574A651E3B85F80061E839 /* ThemeManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ThemeManager.swift; sourceTree = ""; }; 3457C4241F680F1900028233 /* String+BoundingRect.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "String+BoundingRect.swift"; sourceTree = ""; }; @@ -1564,6 +1599,7 @@ 8D1107310486CEB800E47090 /* MAPSME.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = MAPSME.plist; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; 978D4A30199A11E600D72CA7 /* faq.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; name = faq.html; path = ../../data/faq.html; sourceTree = ""; }; 97A5967E19B9CD47007A963F /* copyright.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; name = copyright.html; path = ../../data/copyright.html; sourceTree = ""; }; + 99169D7223D06B390006A9CA /* RatingSummaryViewRenderer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RatingSummaryViewRenderer.swift; sourceTree = ""; }; 9917D17C2396793A00A7E06E /* PaidRoutesSubscriptionCampaign.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PaidRoutesSubscriptionCampaign.swift; sourceTree = ""; }; 9917D17E2397B1D600A7E06E /* IPadModalPresentationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IPadModalPresentationController.swift; sourceTree = ""; }; 991CE2BA2371D349009EB02A /* PromoCampaignManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PromoCampaignManager.swift; sourceTree = ""; }; @@ -1573,6 +1609,11 @@ 991CE2F92379B86B009EB02A /* DeepLinkHandlerStrategy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeepLinkHandlerStrategy.swift; sourceTree = ""; }; 991CE2FB2379B8E5009EB02A /* DeepLinkGeoStrategy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeepLinkGeoStrategy.swift; sourceTree = ""; }; 991CE300237AA8C2009EB02A /* DeepLinkStrategyFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeepLinkStrategyFactory.swift; sourceTree = ""; }; + 991FCA1D23AD0A73009AD684 /* MWMButtonRenderer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MWMButtonRenderer.swift; sourceTree = ""; }; + 991FCA1F23B0FF33009AD684 /* AdsStyleSheet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdsStyleSheet.swift; sourceTree = ""; }; + 991FCA2323B11E61009AD684 /* BookmarksStyleSheet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BookmarksStyleSheet.swift; sourceTree = ""; }; + 991FCA2523B11EDE009AD684 /* UITextViewRenderer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UITextViewRenderer.swift; sourceTree = ""; }; + 991FCA2723B12201009AD684 /* CheckmarkRenderer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CheckmarkRenderer.swift; sourceTree = ""; }; 993F54F8237C622700545511 /* DeepLinkSearchStrategy.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DeepLinkSearchStrategy.swift; sourceTree = ""; }; 993F54F9237C622700545511 /* DeepLinkRouteStrategyAdapter.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DeepLinkRouteStrategyAdapter.mm; sourceTree = ""; }; 993F54FA237C622700545511 /* DeepLinkHandlerStrategy.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DeepLinkHandlerStrategy.swift; sourceTree = ""; }; @@ -1590,6 +1631,31 @@ 993F5506237C622700545511 /* DeepLinkStrategyFactory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DeepLinkStrategyFactory.swift; sourceTree = ""; }; 99425AF3236855BB00D005C0 /* PromoDiscoveryRouter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PromoDiscoveryRouter.swift; sourceTree = ""; }; 99425AFB23685F1E00D005C0 /* PromoDiscoveryPresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PromoDiscoveryPresenter.swift; sourceTree = ""; }; + 994AEBE423AB763C0079B81F /* Colors.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Colors.swift; sourceTree = ""; }; + 994AEBE623AB763C0079B81F /* UISwitchRenderer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UISwitchRenderer.swift; sourceTree = ""; }; + 994AEBEA23AB763C0079B81F /* UIButtonRenderer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIButtonRenderer.swift; sourceTree = ""; }; + 994AEBEB23AB763C0079B81F /* UIActivityIndicatorRenderer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIActivityIndicatorRenderer.swift; sourceTree = ""; }; + 994AEBEC23AB763C0079B81F /* UILabelRenderer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UILabelRenderer.swift; sourceTree = ""; }; + 994AEBEE23AB763C0079B81F /* UIImageRenderer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIImageRenderer.swift; sourceTree = ""; }; + 994AEBEF23AB763C0079B81F /* UITableViewRenderer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UITableViewRenderer.swift; sourceTree = ""; }; + 994AEBF323AB763C0079B81F /* UIWindowRenderer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIWindowRenderer.swift; sourceTree = ""; }; + 994AEBF423AB763C0079B81F /* UINavigationBarRenderer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UINavigationBarRenderer.swift; sourceTree = ""; }; + 994AEBF623AB763C0079B81F /* UITextFieldRenderer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UITextFieldRenderer.swift; sourceTree = ""; }; + 994AEBF723AB763C0079B81F /* UIBarButtonItemRenderer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIBarButtonItemRenderer.swift; sourceTree = ""; }; + 994AEBF823AB763C0079B81F /* UIViewRenderer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIViewRenderer.swift; sourceTree = ""; }; + 994AEBFC23AB763C0079B81F /* UITableViewCellRenderer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UITableViewCellRenderer.swift; sourceTree = ""; }; + 994AEBFD23AB763C0079B81F /* UINavigationItemRenderer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UINavigationItemRenderer.swift; sourceTree = ""; }; + 994AEBFE23AB763C0079B81F /* MainTheme.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainTheme.swift; sourceTree = ""; }; + 994AEC0023AB763C0079B81F /* UIView+styleName.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIView+styleName.swift"; sourceTree = ""; }; + 994AEC0223AB763C0079B81F /* SwizzleStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SwizzleStyle.h; sourceTree = ""; }; + 994AEC0323AB763C0079B81F /* UIColor+rgba.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIColor+rgba.swift"; sourceTree = ""; }; + 994AEC0423AB763C0079B81F /* UIColor+image.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIColor+image.swift"; sourceTree = ""; }; + 994AEC0523AB763C0079B81F /* SwizzleStyle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SwizzleStyle.m; sourceTree = ""; }; + 994AEC0723AB763C0079B81F /* IColors.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IColors.swift; sourceTree = ""; }; + 994AEC0823AB763C0079B81F /* StyleManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StyleManager.swift; sourceTree = ""; }; + 994AEC0923AB763C0079B81F /* Style.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Style.swift; sourceTree = ""; }; + 994AEC0A23AB763C0079B81F /* Theme.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Theme.swift; sourceTree = ""; }; + 994AEC3323AB7B410079B81F /* DiscoveryStyleSheet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DiscoveryStyleSheet.swift; sourceTree = ""; }; 99536110235DABB1008B218F /* BaseSubscriptionViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseSubscriptionViewController.swift; sourceTree = ""; }; 99536112235DB86C008B218F /* BookmarksSubscriptionDiscountLabel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BookmarksSubscriptionDiscountLabel.swift; sourceTree = ""; }; 995738DA235484410019AEE7 /* AllPassSubscriptionViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = AllPassSubscriptionViewController.xib; sourceTree = ""; }; @@ -1608,6 +1674,18 @@ 999D3A68237C0ADD00C5F7A8 /* DeepLinkMapStrategy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeepLinkMapStrategy.swift; sourceTree = ""; }; 999D3A6A237C132B00C5F7A8 /* DeepLinkCataloguePathStrategy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeepLinkCataloguePathStrategy.swift; sourceTree = ""; }; 999D3A6C237C1C0700C5F7A8 /* DeepLinkLeadStrategy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeepLinkLeadStrategy.swift; sourceTree = ""; }; + 999FC11F23ABA9AD00B0E6F9 /* SearchStyleSheet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchStyleSheet.swift; sourceTree = ""; }; + 999FC12123ABABA000B0E6F9 /* IFonts.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IFonts.swift; sourceTree = ""; }; + 999FC12323ABACED00B0E6F9 /* Fonts.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Fonts.swift; sourceTree = ""; }; + 999FC12623ABAF6800B0E6F9 /* IStyleSheet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IStyleSheet.swift; sourceTree = ""; }; + 999FC12823ABAFFE00B0E6F9 /* GlobalStyleSheet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GlobalStyleSheet.swift; sourceTree = ""; }; + 999FC12A23ABB4B800B0E6F9 /* FontStyleSheet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FontStyleSheet.swift; sourceTree = ""; }; + 999FC12E23ABD53300B0E6F9 /* TabViewRenderer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabViewRenderer.swift; sourceTree = ""; }; + 99A614C823BA399D00D8D8D0 /* SubscriptionsStyleSheet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SubscriptionsStyleSheet.swift; sourceTree = ""; }; + 99A614D423C8911A00D8D8D0 /* AuthStyleSheet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthStyleSheet.swift; sourceTree = ""; }; + 99A614D623C8B5F200D8D8D0 /* UIPageControlRenderer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIPageControlRenderer.swift; sourceTree = ""; }; + 99A614E223CDD1D900D8D8D0 /* UIButton+RuntimeAttributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIButton+RuntimeAttributes.h"; sourceTree = ""; }; + 99A614E323CDD1D900D8D8D0 /* UIButton+RuntimeAttributes.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIButton+RuntimeAttributes.m"; sourceTree = ""; }; 99B6A74B2362F5AA002C94CB /* PromoButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PromoButton.swift; sourceTree = ""; }; 99B6A74D2362F5CD002C94CB /* PromoCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PromoCoordinator.swift; sourceTree = ""; }; 99B6A77E23684573002C94CB /* PromoDiscoveryBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PromoDiscoveryBuilder.swift; sourceTree = ""; }; @@ -1630,6 +1708,11 @@ 99E2B0112368A8C700FFABC5 /* MWMCategory+PlacesCountTitle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "MWMCategory+PlacesCountTitle.swift"; sourceTree = ""; }; 99E2B01D23698B0800FFABC5 /* WelcomeProtocols.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WelcomeProtocols.swift; sourceTree = ""; }; 99E2B0222369904800FFABC5 /* WelcomeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WelcomeViewController.swift; sourceTree = ""; }; + 99F50FC223B23F0400E95228 /* UISearchBarRenderer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UISearchBarRenderer.swift; sourceTree = ""; }; + 99F50FC423B26DCB00E95228 /* UITableViewHeaderFooterViewRenderer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UITableViewHeaderFooterViewRenderer.swift; sourceTree = ""; }; + 99F50FC723B273F800E95228 /* MWMTableViewCellRenderer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MWMTableViewCellRenderer.swift; sourceTree = ""; }; + 99F50FC923B3852F00E95228 /* UIToolbarRenderer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIToolbarRenderer.swift; sourceTree = ""; }; + 99F8B4C523B644A6009FF0B4 /* MapStyleSheet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapStyleSheet.swift; sourceTree = ""; }; 9DF04B231B71010E00DACAF1 /* 02_droidsans-fallback.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "02_droidsans-fallback.ttf"; path = "../../data/02_droidsans-fallback.ttf"; sourceTree = ""; }; A367C93A1B17334800E2B6E7 /* resources-default */ = {isa = PBXFileReference; lastKnownFileType = folder; name = "resources-default"; path = "../../data/resources-default"; sourceTree = ""; }; A630D1E9207CA95900976DEA /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = ar; path = ar.lproj/Localizable.stringsdict; sourceTree = ""; }; @@ -1801,7 +1884,6 @@ F653CE141C71F60200A453F1 /* MWMAddPlaceNavigationBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMAddPlaceNavigationBar.h; sourceTree = ""; }; F653CE151C71F60200A453F1 /* MWMAddPlaceNavigationBar.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMAddPlaceNavigationBar.mm; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; F653CE171C71F62400A453F1 /* MWMAddPlaceNavigationBar.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMAddPlaceNavigationBar.xib; sourceTree = ""; }; - F6550C1D1FD81B3800352D88 /* RatingSummaryView+DefaultConfig.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "RatingSummaryView+DefaultConfig.swift"; sourceTree = ""; }; F655C026207278300048A241 /* DiscoveryMoreCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DiscoveryMoreCell.swift; sourceTree = ""; }; F655C02820727A630048A241 /* DiscoveryMoreCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = DiscoveryMoreCell.xib; sourceTree = ""; }; F6588E2A1B15C26700EE1E58 /* MWMTextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMTextView.h; sourceTree = ""; }; @@ -2379,6 +2461,7 @@ 340475281E081A4600C92850 /* Core */ = { isa = PBXGroup; children = ( + 994AEBE323AB763C0079B81F /* Theme */, 993F54F6237C622700545511 /* DeepLink */, 991CE2B92371D349009EB02A /* PromoCampaign */, CDCA27822245090900167D87 /* EventListening */, @@ -2627,21 +2710,18 @@ 3454D7981E07F045004AF2AD /* Categories */ = { isa = PBXGroup; children = ( + 99A614E223CDD1D900D8D8D0 /* UIButton+RuntimeAttributes.h */, + 99A614E323CDD1D900D8D8D0 /* UIButton+RuntimeAttributes.m */, 34D3B04D1E38A20C004100F9 /* Bundle+Init.swift */, - 3454D7991E07F045004AF2AD /* CALayer+RuntimeAttributes.h */, - 3454D79A1E07F045004AF2AD /* CALayer+RuntimeAttributes.m */, 3454D79B1E07F045004AF2AD /* CLLocation+Mercator.h */, 3454D79C1E07F045004AF2AD /* CLLocation+Mercator.mm */, 3454D79D1E07F045004AF2AD /* DateComponentsFormatter+ETA.swift */, 3454D79E1E07F045004AF2AD /* NSString+Categories.h */, 3454D79F1E07F045004AF2AD /* NSString+Categories.m */, - F6550C1D1FD81B3800352D88 /* RatingSummaryView+DefaultConfig.swift */, 3457C4241F680F1900028233 /* String+BoundingRect.swift */, 34763F051F3092E700F4D2D3 /* String+Format.swift */, 3454D7A01E07F045004AF2AD /* UIButton+Orientation.h */, 3454D7A11E07F045004AF2AD /* UIButton+Orientation.m */, - 3454D7A21E07F045004AF2AD /* UIButton+RuntimeAttributes.h */, - 3454D7A31E07F045004AF2AD /* UIButton+RuntimeAttributes.m */, 34D3AFF41E37A36A004100F9 /* UICollectionView+Cells.swift */, 1DFA2F6E20D3CA9200FB2C66 /* UIColorRoutines.h */, 1DFA2F6820D3B52F00FB2C66 /* UIColor+PartnerColor.h */, @@ -2661,8 +2741,6 @@ 3454D7AE1E07F045004AF2AD /* UILabel+RuntimeAttributes.h */, 3454D7AF1E07F045004AF2AD /* UILabel+RuntimeAttributes.m */, 34D3AFE81E378AF1004100F9 /* UINib+Init.swift */, - 3454D7B01E07F045004AF2AD /* UISwitch+RuntimeAttributes.h */, - 3454D7B11E07F045004AF2AD /* UISwitch+RuntimeAttributes.m */, 34D3AFF01E37945B004100F9 /* UITableView+Cells.swift */, 34D3AFE01E376F7E004100F9 /* UITableView+Updates.swift */, 3454D7B21E07F045004AF2AD /* UITextField+RuntimeAttributes.h */, @@ -2672,8 +2750,6 @@ 348B926B1FF3B5E100379009 /* UIView+Animation.swift */, 3404164A1E7BF42D00E2B6D6 /* UIView+Coordinates.swift */, 34F5E0D21E3F254800B1C415 /* UIView+Hierarchy.swift */, - 3454D7B61E07F045004AF2AD /* UIView+RuntimeAttributes.h */, - 3454D7B71E07F045004AF2AD /* UIView+RuntimeAttributes.m */, 340416461E7BF28E00E2B6D6 /* UIView+Snapshot.swift */, 349D1CE21E3F836900A878FD /* UIViewController+Hierarchy.swift */, 34F7422F1E0834F400AC1FD6 /* UIViewController+Navigation.h */, @@ -2689,14 +2765,6 @@ path = Categories; sourceTree = ""; }; - 34574A601E3B5B2A0061E839 /* Appearance */ = { - isa = PBXGroup; - children = ( - 34574A651E3B85F80061E839 /* ThemeManager.swift */, - ); - path = Appearance; - sourceTree = ""; - }; 345C34661CE9D32500BB2224 /* SideButtons */ = { isa = PBXGroup; children = ( @@ -3570,6 +3638,81 @@ path = Strategies; sourceTree = ""; }; + 994AEBE323AB763C0079B81F /* Theme */ = { + isa = PBXGroup; + children = ( + 999FC12523ABAF5200B0E6F9 /* Core */, + 994AEBE523AB763C0079B81F /* Renderers */, + 994AEBFF23AB763C0079B81F /* Extensions */, + 994AEC0623AB763C0079B81F /* Components */, + 994AEBE423AB763C0079B81F /* Colors.swift */, + 999FC12323ABACED00B0E6F9 /* Fonts.swift */, + 994AEBFE23AB763C0079B81F /* MainTheme.swift */, + 999FC12823ABAFFE00B0E6F9 /* GlobalStyleSheet.swift */, + 99F8B4C523B644A6009FF0B4 /* MapStyleSheet.swift */, + 991FCA1F23B0FF33009AD684 /* AdsStyleSheet.swift */, + 991FCA2323B11E61009AD684 /* BookmarksStyleSheet.swift */, + 999FC11F23ABA9AD00B0E6F9 /* SearchStyleSheet.swift */, + 99A614C823BA399D00D8D8D0 /* SubscriptionsStyleSheet.swift */, + 994AEC3323AB7B410079B81F /* DiscoveryStyleSheet.swift */, + 999FC12A23ABB4B800B0E6F9 /* FontStyleSheet.swift */, + 99A614D423C8911A00D8D8D0 /* AuthStyleSheet.swift */, + ); + path = Theme; + sourceTree = ""; + }; + 994AEBE523AB763C0079B81F /* Renderers */ = { + isa = PBXGroup; + children = ( + 991FCA2723B12201009AD684 /* CheckmarkRenderer.swift */, + 991FCA1D23AD0A73009AD684 /* MWMButtonRenderer.swift */, + 99F50FC723B273F800E95228 /* MWMTableViewCellRenderer.swift */, + 99169D7223D06B390006A9CA /* RatingSummaryViewRenderer.swift */, + 999FC12E23ABD53300B0E6F9 /* TabViewRenderer.swift */, + 994AEBEB23AB763C0079B81F /* UIActivityIndicatorRenderer.swift */, + 994AEBEA23AB763C0079B81F /* UIButtonRenderer.swift */, + 994AEBF723AB763C0079B81F /* UIBarButtonItemRenderer.swift */, + 994AEBEE23AB763C0079B81F /* UIImageRenderer.swift */, + 994AEBEC23AB763C0079B81F /* UILabelRenderer.swift */, + 994AEBF423AB763C0079B81F /* UINavigationBarRenderer.swift */, + 994AEBFD23AB763C0079B81F /* UINavigationItemRenderer.swift */, + 99A614D623C8B5F200D8D8D0 /* UIPageControlRenderer.swift */, + 994AEBF623AB763C0079B81F /* UITextFieldRenderer.swift */, + 991FCA2523B11EDE009AD684 /* UITextViewRenderer.swift */, + 99F50FC923B3852F00E95228 /* UIToolbarRenderer.swift */, + 994AEBEF23AB763C0079B81F /* UITableViewRenderer.swift */, + 99F50FC423B26DCB00E95228 /* UITableViewHeaderFooterViewRenderer.swift */, + 994AEBFC23AB763C0079B81F /* UITableViewCellRenderer.swift */, + 99F50FC223B23F0400E95228 /* UISearchBarRenderer.swift */, + 994AEBE623AB763C0079B81F /* UISwitchRenderer.swift */, + 994AEBF323AB763C0079B81F /* UIWindowRenderer.swift */, + 994AEBF823AB763C0079B81F /* UIViewRenderer.swift */, + 1185C52B23BB53A7004BF349 /* UIViewControllerRenderer.swift */, + ); + path = Renderers; + sourceTree = ""; + }; + 994AEBFF23AB763C0079B81F /* Extensions */ = { + isa = PBXGroup; + children = ( + 994AEC0023AB763C0079B81F /* UIView+styleName.swift */, + 994AEC0223AB763C0079B81F /* SwizzleStyle.h */, + 994AEC0523AB763C0079B81F /* SwizzleStyle.m */, + 994AEC0323AB763C0079B81F /* UIColor+rgba.swift */, + 994AEC0423AB763C0079B81F /* UIColor+image.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 994AEC0623AB763C0079B81F /* Components */ = { + isa = PBXGroup; + children = ( + 994AEC0723AB763C0079B81F /* IColors.swift */, + 999FC12123ABABA000B0E6F9 /* IFonts.swift */, + ); + path = Components; + sourceTree = ""; + }; 995738D9235481FE0019AEE7 /* Subscription */ = { isa = PBXGroup; children = ( @@ -3594,6 +3737,18 @@ path = Pages; sourceTree = ""; }; + 999FC12523ABAF5200B0E6F9 /* Core */ = { + isa = PBXGroup; + children = ( + 34574A651E3B85F80061E839 /* ThemeManager.swift */, + 994AEC0823AB763C0079B81F /* StyleManager.swift */, + 994AEC0923AB763C0079B81F /* Style.swift */, + 999FC12623ABAF6800B0E6F9 /* IStyleSheet.swift */, + 994AEC0A23AB763C0079B81F /* Theme.swift */, + ); + path = Core; + sourceTree = ""; + }; 99B6A74A2362F579002C94CB /* PromoButton */ = { isa = PBXGroup; children = ( @@ -4061,7 +4216,6 @@ CDB4D4DA222D24EE00104869 /* CarPlay */, F6E407CC1FC45ED4001F7821 /* Discovery */, 3432E17F1E49BEFA008477E9 /* Ads */, - 34574A601E3B5B2A0061E839 /* Appearance */, 34BBD6491F826BD50070CA50 /* Authorization */, F69018B51E9E5FEB00B3C10B /* Autoupdate */, 34E7760D1F14B165003040B3 /* AvailableArea */, @@ -5029,9 +5183,10 @@ 47F86D0120C93D8D00FEE291 /* TabViewController.swift in Sources */, 99536113235DB86C008B218F /* BookmarksSubscriptionDiscountLabel.swift in Sources */, 6741A9A51BF340DE002C974C /* MWMShareActivityItem.mm in Sources */, - 3454D7B91E07F045004AF2AD /* CALayer+RuntimeAttributes.m in Sources */, + 994AEC2723AB763C0079B81F /* MainTheme.swift in Sources */, 99E2B0232369904800FFABC5 /* WelcomeViewController.swift in Sources */, F6E2FF5D1E097BA00083EBEC /* MWMRecentTrackSettingsController.mm in Sources */, + 994AEC2023AB763C0079B81F /* UIBarButtonItemRenderer.swift in Sources */, 34AB66651FC5AA330078E451 /* TransportTransitTrain.swift in Sources */, 343064411E9FDC7300DC7665 /* SearchIndex.swift in Sources */, F6664BFA1E6459CB00E703C2 /* FacilityCell.swift in Sources */, @@ -5049,6 +5204,7 @@ 473464A7218B0BC000D6AF5B /* MWMPurchaseValidation.mm in Sources */, 4767CDA420AAF66B00BD8166 /* NSAttributedString+HTML.swift in Sources */, 47B06DFE21B965950094CCAD /* Geo.swift in Sources */, + 999FC12F23ABD53300B0E6F9 /* TabViewRenderer.swift in Sources */, 6741A9A91BF340DE002C974C /* MWMDefaultAlert.mm in Sources */, 340708781F2B5D6C00029ECC /* DimBackground.swift in Sources */, 99D363172358647700941BF4 /* SubscriptionGroup.swift in Sources */, @@ -5074,6 +5230,7 @@ 3467CEB2202C6EEE00D3C670 /* BMCNotificationsHeader.swift in Sources */, 34F4072F1E9E1AFF00E57AC0 /* BannersCache.swift in Sources */, 34D3B0211E389D05004100F9 /* MWMEditorAddAdditionalNameTableViewCell.m in Sources */, + 999FC12923ABAFFE00B0E6F9 /* GlobalStyleSheet.swift in Sources */, 99D363192358685300941BF4 /* SubscriptionGroupItem.swift in Sources */, 348F8A531F863B6100060C2A /* UGCReview.swift in Sources */, 340475501E081A4600C92850 /* fabric_logging_ios.mm in Sources */, @@ -5086,6 +5243,7 @@ 34ABA6291C2D567B00FE1BEC /* MWMInputLoginValidator.m in Sources */, 337F98B421D3C9F200C8AC27 /* SearchHistoryViewController.swift in Sources */, 3404F49D2028A2430090E401 /* BMCActionsCreateCell.swift in Sources */, + 999FC12723ABAF6800B0E6F9 /* IStyleSheet.swift in Sources */, F6E2FD8F1E097BA00083EBEC /* MWMNoMapsViewController.mm in Sources */, F63AF50B1EA6213F00A1DB98 /* FilterRatingCell.swift in Sources */, 34D3B0421E389D05004100F9 /* MWMEditorTextTableViewCell.m in Sources */, @@ -5097,6 +5255,7 @@ 34AB66471FC5AA330078E451 /* RouteManagerTableView.swift in Sources */, 47E98C102382C80600C800E0 /* PlacePageInfoViewController.swift in Sources */, 47DF72B922520CE20004AB10 /* MWMRoutingOptions.mm in Sources */, + 999FC12023ABA9AD00B0E6F9 /* SearchStyleSheet.swift in Sources */, 99B6A74E2362F5CD002C94CB /* PromoCoordinator.swift in Sources */, 3D15ACEE2155117000F725D5 /* MWMObjectsCategorySelectorDataSource.mm in Sources */, F69739B21FD197DB00FDA07D /* MWMDiscoveryTableManager.mm in Sources */, @@ -5114,15 +5273,18 @@ 34E50DF81F6FCC96008EED49 /* UGCReviewCell.swift in Sources */, F6E2FF3F1E097BA00083EBEC /* MWMSearchTableViewController.mm in Sources */, F6E2FDE01E097BA00083EBEC /* MWMEditorViewController.mm in Sources */, + 994AEC3423AB7B410079B81F /* DiscoveryStyleSheet.swift in Sources */, 6741A9C01BF340DE002C974C /* MWMTextView.m in Sources */, B32FE74320D2B09600EF7446 /* CatalogWebViewController.swift in Sources */, F6E2FDB61E097BA00083EBEC /* MWMEditorAdditionalNamesHeader.m in Sources */, F6E2FDC81E097BA00083EBEC /* MWMEditorNotesFooter.m in Sources */, F6E2FD651E097BA00083EBEC /* MWMMapDownloaderPlaceTableViewCell.m in Sources */, + 991FCA2623B11EDE009AD684 /* UITextViewRenderer.swift in Sources */, + 994AEC1323AB763C0079B81F /* UIButtonRenderer.swift in Sources */, F6E2FF2D1E097BA00083EBEC /* MWMSearchCell.mm in Sources */, 3454D7C51E07F045004AF2AD /* UIButton+Orientation.m in Sources */, - 3454D7E61E07F045004AF2AD /* UIView+RuntimeAttributes.m in Sources */, 34AB66831FC5AA330078E451 /* NavigationAddPointToastView.swift in Sources */, + 991FCA2023B0FF33009AD684 /* AdsStyleSheet.swift in Sources */, F6E2FE4C1E097BA00083EBEC /* MWMPlacePageManager.mm in Sources */, 3404757E1E081B3300C92850 /* iosOGLContext.mm in Sources */, 34763F071F3092E700F4D2D3 /* String+Format.swift in Sources */, @@ -5138,6 +5300,7 @@ 342EE4121C43DAA7009F6A49 /* MWMAuthorizationWebViewLoginViewController.mm in Sources */, 47E3C7292111E614008B3B27 /* FadeInAnimatedTransitioning.swift in Sources */, 34AB667D1FC5AA330078E451 /* MWMRoutePreview.mm in Sources */, + 99F50FCA23B3852F00E95228 /* UIToolbarRenderer.swift in Sources */, B33D21AC20DA515800BAD749 /* MWMCategoryInfoCell.mm in Sources */, 473CBF9B2164DD470059BD54 /* SettingsTableViewSelectableProgressCell.swift in Sources */, 47E3C72D2111E6A2008B3B27 /* FadeTransitioning.swift in Sources */, @@ -5154,6 +5317,7 @@ 474AC76C2139E4F2002F9BF9 /* RemoveAdsViewController.swift in Sources */, 34ABA62D1C2D57D500FE1BEC /* MWMInputPasswordValidator.m in Sources */, 475EFDBB238FDDB200A24B4C /* CatalogSingleItemViewController.swift in Sources */, + 994AEC0E23AB763C0079B81F /* Colors.swift in Sources */, BBED27022292F6C000788143 /* BookmarksSection.mm in Sources */, F6E2FDA11E097BA00083EBEC /* MWMEditorAdditionalNamesTableViewController.mm in Sources */, 999D3A67237BFA4600C5F7A8 /* SubscriptionViewBuilder.swift in Sources */, @@ -5171,6 +5335,7 @@ 34D3B0181E389D05004100F9 /* EditorAdditionalNamePlaceholderTableViewCell.swift in Sources */, 346DB8281E5C4F6700E3123E /* GalleryCell.swift in Sources */, 47B9065521C7FA400079C85E /* NSString+MD5.m in Sources */, + 994AEC2123AB763C0079B81F /* UIViewRenderer.swift in Sources */, CDB4D5022231412900104869 /* SettingsTemplateBuilder.swift in Sources */, F6EBB26F1FD7E33300B69B6A /* DiscoveryNoResultsCell.swift in Sources */, 47D0026721999DA900F651A2 /* PendingTransactionsHandler.swift in Sources */, @@ -5178,6 +5343,7 @@ F6E2FDFE1E097BA00083EBEC /* MWMOpeningHoursClosedSpanTableViewCell.mm in Sources */, F6E2FEDC1E097BA00083EBEC /* MWMSearchManager+Filter.mm in Sources */, 34B846A12029DCC10081ECCD /* BMCCategoriesHeader.swift in Sources */, + 99A614D523C8911A00D8D8D0 /* AuthStyleSheet.swift in Sources */, 346DB8341E5C4F6700E3123E /* GalleryViewController.swift in Sources */, F61757ED1FC73027000AD0D0 /* DiscoveryOnlineTemplateCell.swift in Sources */, 99425AF4236855BB00D005C0 /* PromoDiscoveryRouter.swift in Sources */, @@ -5185,6 +5351,7 @@ 34F4073B1E9E1AFF00E57AC0 /* MopubBanner.swift in Sources */, 47B9065421C7FA400079C85E /* UIImageView+WebImage.m in Sources */, F6E2FF481E097BA00083EBEC /* SettingsTableViewSelectableCell.swift in Sources */, + 994AEC2D23AB763C0079B81F /* StyleManager.swift in Sources */, 34BBD6581F826F810070CA50 /* AuthorizationTransitioningManager.swift in Sources */, 33F7668F21A57CDF00A88B16 /* EditOnWebViewController.swift in Sources */, 34AB664A1FC5AA330078E451 /* RouteManageriPadPresentationController.swift in Sources */, @@ -5194,7 +5361,6 @@ 34C9BD0A1C6DBCDA000DC38D /* MWMNavigationController.m in Sources */, 472848F72383F8F700176158 /* WikiDescriptionViewController.swift in Sources */, CDB92CF822A5350500EC757C /* MWMDiscoveryHotelViewModel.m in Sources */, - F6550C1F1FD81B3800352D88 /* RatingSummaryView+DefaultConfig.swift in Sources */, 991CE2C02371D349009EB02A /* PromoCampaign.swift in Sources */, F6E2FE311E097BA00083EBEC /* MWMStreetEditorViewController.mm in Sources */, 99CB34B32369DF2E001D28AD /* WhatsNewBuilder.swift in Sources */, @@ -5208,6 +5374,7 @@ F6E2FD8C1E097BA00083EBEC /* MWMNoMapsView.m in Sources */, 34D3B0361E389D05004100F9 /* MWMEditorSelectTableViewCell.m in Sources */, F6E2FD711E097BA00083EBEC /* MWMMapDownloaderTableViewCell.m in Sources */, + 994AEC2E23AB763C0079B81F /* Style.swift in Sources */, F6E2FE4F1E097BA00083EBEC /* MWMActionBarButton.m in Sources */, 47F86CFF20C936FC00FEE291 /* TabView.swift in Sources */, 34AB66741FC5AA330078E451 /* BaseRoutePreviewStatus.swift in Sources */, @@ -5215,6 +5382,7 @@ 349D1CE41E3F836900A878FD /* UIViewController+Hierarchy.swift in Sources */, CDB4D4E1222D70DF00104869 /* CarPlayMapViewController.swift in Sources */, 471AB98923AA8A3500F56D49 /* IDownloaderDataSource.swift in Sources */, + 994AEC0F23AB763C0079B81F /* UISwitchRenderer.swift in Sources */, F692F3831EA0FAF5001E82EB /* MWMAutoupdateController.mm in Sources */, 34574A671E3B85F80061E839 /* ThemeManager.swift in Sources */, 34BF0CC71C31304A00D097EB /* MWMAuthorizationCommon.mm in Sources */, @@ -5225,7 +5393,9 @@ 349D1AD81E2E325C004A2006 /* MWMBottomMenuLayout.m in Sources */, 3454D7E01E07F045004AF2AD /* UITextField+RuntimeAttributes.m in Sources */, 1DFA2F6A20D3B57400FB2C66 /* UIColor+PartnerColor.m in Sources */, + 999FC12423ABACED00B0E6F9 /* Fonts.swift in Sources */, 347BFA901F27909200E5531F /* MenuArea.swift in Sources */, + 99A614E423CDD1D900D8D8D0 /* UIButton+RuntimeAttributes.m in Sources */, 343E75981E5B1EE20041226A /* MWMCollectionViewController.m in Sources */, 47F701F6238C8A8300D18E95 /* PlacePageButtonsViewController.swift in Sources */, B3E3B50220D485FA00DA8C13 /* DownloadedBookmarksDataSource.swift in Sources */, @@ -5235,6 +5405,7 @@ 47A0416D238DBB6200D84E95 /* HotelPhotosViewController.swift in Sources */, 34AB66081FC5AA320078E451 /* MWMNavigationDashboardManager.mm in Sources */, 47A0416F238DD0FD00D84E95 /* HotelDescriptionViewController.swift in Sources */, + 994AEC1823AB763C0079B81F /* UITableViewRenderer.swift in Sources */, 991CE2BF2371D349009EB02A /* PromoCampaignManager.swift in Sources */, F6E2FE431E097BA00083EBEC /* MWMDirectionView.mm in Sources */, 470F5A5B2181DE7500754295 /* PaidRouteViewController.swift in Sources */, @@ -5251,6 +5422,7 @@ 6741A9E71BF340DE002C974C /* MWMCircularProgressView.m in Sources */, 34AC8FDB1EFC07FE00E7F910 /* UILabel+NumberOfVisibleLines.swift in Sources */, 99B6A77F23684573002C94CB /* PromoDiscoveryBuilder.swift in Sources */, + 994AEC2C23AB763C0079B81F /* IColors.swift in Sources */, 4767CD9F20AAD48A00BD8166 /* Checkmark.swift in Sources */, F6E2FD981E097BA00083EBEC /* MWMBookmarkTitleCell.m in Sources */, 33E905462180C40900868CAC /* UIViewController+Authorization.swift in Sources */, @@ -5286,8 +5458,10 @@ 993F550B237C622700545511 /* DeepLinkIncorrectStrategy.swift in Sources */, 34BBD65C1F826FD30070CA50 /* AuthorizationiPhonePresentationController.swift in Sources */, 56C74C391C74A3BC00B71B9F /* MWMInputEmailValidator.m in Sources */, + 994AEC2523AB763C0079B81F /* UITableViewCellRenderer.swift in Sources */, 6741A9F51BF340DE002C974C /* BookmarksVC.mm in Sources */, B33D21B820E130D000BAD749 /* BookmarksTabViewController.swift in Sources */, + 994AEC1C23AB763C0079B81F /* UIWindowRenderer.swift in Sources */, 3358607E217632A2006D11F2 /* BookmarksSharingViewController.swift in Sources */, 99CB34C5236B00FD001D28AD /* WelcomeStorage.swift in Sources */, CDB92CF1229EB8A800EC757C /* MWMDiscoverySearchViewModel.m in Sources */, @@ -5298,6 +5472,7 @@ 34F4072C1E9E1AFF00E57AC0 /* Banner.swift in Sources */, F660DEE51EAF4F59004DC056 /* MWMLocationManager+SpeedAndAltitude.swift in Sources */, F6E2FDF21E097BA00083EBEC /* MWMOpeningHoursAddScheduleTableViewCell.mm in Sources */, + 99F50FC523B26DCB00E95228 /* UITableViewHeaderFooterViewRenderer.swift in Sources */, 3304306D21D4EAFB00317CA3 /* SearchCategoryCell.swift in Sources */, 34AB66111FC5AA320078E451 /* NavigationTurnsView.swift in Sources */, 348A8DF81F66775A00D83026 /* RatingViewDelegate.swift in Sources */, @@ -5305,6 +5480,7 @@ 3490D2E11CE9DD2500D0B838 /* MWMSideButtonsView.mm in Sources */, 47F4F21523A6F06F0022FD56 /* AvailableMapsDataSource.swift in Sources */, 995739062355CAC40019AEE7 /* ImageViewCrossDisolve.swift in Sources */, + 994AEC1F23AB763C0079B81F /* UITextFieldRenderer.swift in Sources */, 47B9065221C7FA400079C85E /* MWMWebImage.m in Sources */, F6E2FE7C1E097BA00083EBEC /* MWMPlacePageOpeningHoursCell.mm in Sources */, 340E1EFB1E2F614400CE49BF /* Storyboard.swift in Sources */, @@ -5330,7 +5506,6 @@ 47A6F3C5235F47B90053FBA4 /* BookmarksSubscriptionButton.swift in Sources */, 34AB66411FC5AA330078E451 /* RouteManagerTransitioningManager.swift in Sources */, 3454D7CE1E07F045004AF2AD /* UIFont+MapsMeFonts.m in Sources */, - 3454D7DD1E07F045004AF2AD /* UISwitch+RuntimeAttributes.m in Sources */, CD4A1F1A230EADC100F2A6B6 /* CatalogConnectionErrorView.swift in Sources */, 991CE2C22371D349009EB02A /* PromoDiscoveryCampaign.swift in Sources */, 4719A647219CBD7F009F9AA7 /* IBillingPendingTransaction.swift in Sources */, @@ -5339,6 +5514,7 @@ 340FDC092031C39E00F140AD /* BMCPermissionsPendingCell.swift in Sources */, 993F550C237C622700545511 /* DeepLinkSubscriptionStrategy.swift in Sources */, F6E2FD6B1E097BA00083EBEC /* MWMMapDownloaderSubplaceTableViewCell.m in Sources */, + 994AEC2A23AB763C0079B81F /* UIColor+image.swift in Sources */, CDCA27842245090900167D87 /* ListenerContainer.swift in Sources */, 475EFDBF239031CD00A24B4C /* PlacePageBookmarkViewController.swift in Sources */, 47E3C7252111E41B008B3B27 /* DimmedModalPresentationController.swift in Sources */, @@ -5356,7 +5532,6 @@ CDCA27382237F1BD00167D87 /* BookmarkInfo.swift in Sources */, 993F5509237C622700545511 /* DeepLinkHandlerStrategy.swift in Sources */, 34AB668C1FC5AA330078E451 /* NavigationStreetNameView.swift in Sources */, - 3454D7C81E07F045004AF2AD /* UIButton+RuntimeAttributes.m in Sources */, 337F98A621D37B7400C8AC27 /* SearchTabViewController.swift in Sources */, 479D306122C6634900D18278 /* MWMMegafonBannerViewController.m in Sources */, 3488B0131E9D0AEC0068AFD8 /* AdBanner.swift in Sources */, @@ -5378,14 +5553,18 @@ F6E2FF4E1E097BA00083EBEC /* MWMAboutController.m in Sources */, 993F5512237C622700545511 /* DeepLinkFileStrategy.swift in Sources */, 47B06DF921B95F5E0094CCAD /* IGeoTracker.swift in Sources */, + 99F50FC823B273F800E95228 /* MWMTableViewCellRenderer.swift in Sources */, CDCA27812243F59800167D87 /* CarPlayRouter.swift in Sources */, 34F407381E9E1AFF00E57AC0 /* FacebookBanner.swift in Sources */, 99CB34BD2369EAAC001D28AD /* TermsOfUsePresenter.swift in Sources */, 34F5E0D41E3F254800B1C415 /* UIView+Hierarchy.swift in Sources */, 99CB34C02369EAAC001D28AD /* TermsOfUseBuilder.swift in Sources */, 33BCDF8B218C976D00EF5B74 /* TagsCollectionViewLayout.swift in Sources */, + 99F50FC323B23F0400E95228 /* UISearchBarRenderer.swift in Sources */, 6741AA0B1BF340DE002C974C /* MWMMapViewControlsManager.mm in Sources */, F6E2FED91E097BA00083EBEC /* MWMSearchContentView.m in Sources */, + 99169D7323D06B390006A9CA /* RatingSummaryViewRenderer.swift in Sources */, + 994AEC2623AB763C0079B81F /* UINavigationItemRenderer.swift in Sources */, F6BD1D211CA412920047B8E8 /* MWMOsmAuthAlert.mm in Sources */, 47CF2E6323BA0DD500D11C30 /* CopyLabel.swift in Sources */, 472848F92384CEC900176158 /* TaxiViewController.swift in Sources */, @@ -5394,9 +5573,11 @@ F6E2FF4B1E097BA00083EBEC /* SettingsTableViewSwitchCell.swift in Sources */, 47A04173238E989200D84E95 /* HotelReviewsViewController.swift in Sources */, 472E3F4A2146C4CD0020E412 /* MWMPurchaseManager.mm in Sources */, + 994AEC2F23AB763C0079B81F /* Theme.swift in Sources */, 34ABA6211C2D517500FE1BEC /* MWMInputValidator.m in Sources */, 47C7F97521930F5300C2760C /* IInAppBilling.swift in Sources */, 4719A64E21A30C3B009F9AA7 /* PaidRouteStatistics.swift in Sources */, + 994AEC2823AB763C0079B81F /* UIView+styleName.swift in Sources */, 34BBD6601F8270360070CA50 /* AuthorizationiPadPresentationController.swift in Sources */, F6E2FED31E097BA00083EBEC /* MWMSearchHotelsFilterViewController.mm in Sources */, 347752901F7251C7000D46A3 /* UGCAddReviewTextCell.swift in Sources */, @@ -5406,6 +5587,7 @@ 3472B5D3200F501500DC6CD5 /* BackgroundFetchTaskFrameworkType.swift in Sources */, F6E2FF301E097BA00083EBEC /* MWMSearchCommonCell.mm in Sources */, F655C027207278300048A241 /* DiscoveryMoreCell.swift in Sources */, + 994AEC2923AB763C0079B81F /* UIColor+rgba.swift in Sources */, 337F98B821D3D67E00C8AC27 /* SearchHistoryQueryCell.swift in Sources */, 99536111235DABB1008B218F /* BaseSubscriptionViewController.swift in Sources */, 34AB66621FC5AA330078E451 /* TransportTransitSeparator.swift in Sources */, @@ -5418,8 +5600,11 @@ 34763EE71F2F392300F4D2D3 /* MWMTextToSpeech.mm in Sources */, 34ABA6251C2D551900FE1BEC /* MWMInputValidatorFactory.m in Sources */, 348F8A4F1F863A8500060C2A /* UGCYourReview.swift in Sources */, + 999FC12223ABABA000B0E6F9 /* IFonts.swift in Sources */, F6E2FEE21E097BA00083EBEC /* MWMSearchManager.mm in Sources */, F6E2FE221E097BA00083EBEC /* MWMOpeningHoursEditorViewController.mm in Sources */, + 999FC12B23ABB4B800B0E6F9 /* FontStyleSheet.swift in Sources */, + 994AEC1423AB763C0079B81F /* UIActivityIndicatorRenderer.swift in Sources */, 34943BBB1E2626B200B14F84 /* WelcomePageController.swift in Sources */, 34D3AFE21E376F7E004100F9 /* UITableView+Updates.swift in Sources */, 3404164C1E7BF42E00E2B6D6 /* UIView+Coordinates.swift in Sources */, @@ -5429,6 +5614,7 @@ F6E2FD921E097BA00083EBEC /* MWMBookmarkColorViewController.mm in Sources */, CD96C71C22A8113100DB7CFE /* MWMDiscoveryControllerViewModel.mm in Sources */, 470F0B7F2388431E006AEC94 /* StarRatingView.swift in Sources */, + 99F8B4C623B644A6009FF0B4 /* MapStyleSheet.swift in Sources */, F63AF5061EA6162400A1DB98 /* FilterTypeCell.swift in Sources */, 347752881F725002000D46A3 /* UGCAddReviewRatingCell.swift in Sources */, 47E3C7332111F4D8008B3B27 /* CoverVerticalDismissalAnimator.swift in Sources */, @@ -5436,13 +5622,16 @@ 471AB99423ABA3BD00F56D49 /* SearchMapsDataSource.swift in Sources */, 993F550F237C622700545511 /* DeepLinkMapStrategy.swift in Sources */, 34AB661A1FC5AA330078E451 /* MWMTaxiCollectionLayout.m in Sources */, + 994AEC2B23AB763C0079B81F /* SwizzleStyle.m in Sources */, 345C2F8A1F86361B009DB8B4 /* MWMUGCViewModel.mm in Sources */, 33F8BA4E2199AB9500ECA8EE /* TagsDataSource.swift in Sources */, 993F5507237C622700545511 /* DeepLinkSearchStrategy.swift in Sources */, + 994AEC1723AB763C0079B81F /* UIImageRenderer.swift in Sources */, 47F67D1521CAB21B0069754E /* MWMImageCoder.m in Sources */, 34AB66861FC5AA330078E451 /* MWMNavigationInfoView.mm in Sources */, 34C9BD051C6DB693000DC38D /* MWMViewController.m in Sources */, 47699A0A21F0C4C8009E6585 /* NotificationManager.swift in Sources */, + 991FCA1E23AD0A73009AD684 /* MWMButtonRenderer.swift in Sources */, 331630D12191D74B00BB91A9 /* TagSectionHeaderView.swift in Sources */, 47868A7D22145A95000AFC86 /* GuideDescriptionViewController.swift in Sources */, F6E2FDA41E097BA00083EBEC /* MWMCuisineEditorViewController.mm in Sources */, @@ -5466,13 +5655,17 @@ 34AB66441FC5AA330078E451 /* RouteManagerViewModelProtocol.swift in Sources */, 3486B5081E27A4B50069C126 /* LocalNotificationManager.mm in Sources */, 3454D7BF1E07F045004AF2AD /* DateComponentsFormatter+ETA.swift in Sources */, + 991FCA2423B11E61009AD684 /* BookmarksStyleSheet.swift in Sources */, 6741AA1C1BF340DE002C974C /* MWMRoutingDisclaimerAlert.m in Sources */, 34D3B0481E389D05004100F9 /* MWMNoteCell.m in Sources */, CD9AD967228067F500EC174A /* MapInfo.swift in Sources */, 47F6E51221F61908004580CA /* CoreNotificationWrapper.mm in Sources */, + 99A614D723C8B5F200D8D8D0 /* UIPageControlRenderer.swift in Sources */, 344532561F7155540059FBCC /* UGCReviewModel.swift in Sources */, + 994AEC1D23AB763C0079B81F /* UINavigationBarRenderer.swift in Sources */, 6741AA1D1BF340DE002C974C /* MWMDownloadTransitMapAlert.mm in Sources */, 346B42AC1DD5E3D20094EBEE /* MWMLocationNotFoundAlert.mm in Sources */, + 994AEC1523AB763C0079B81F /* UILabelRenderer.swift in Sources */, 340475091E08199E00C92850 /* MWMMyTarget.mm in Sources */, 340416501E7C086000E2B6D6 /* PhotoViewController.swift in Sources */, 674A7E301C0DB10B003D48E1 /* MWMMapWidgets.mm in Sources */, @@ -5489,6 +5682,7 @@ F6E2FF601E097BA00083EBEC /* MWMSettingsViewController.mm in Sources */, F6E2FE2B1E097BA00083EBEC /* MWMStreetEditorEditTableViewCell.m in Sources */, 34AB66891FC5AA330078E451 /* NavigationControlView.swift in Sources */, + 99A614C923BA399D00D8D8D0 /* SubscriptionsStyleSheet.swift in Sources */, 479EE94A2292FB03009DEBA6 /* ActivityIndicator.swift in Sources */, 34AB661D1FC5AA330078E451 /* MWMTaxiPreviewDataSource.mm in Sources */, 47B9065321C7FA400079C85E /* MWMImageCache.m in Sources */, @@ -5509,10 +5703,12 @@ 995739082355CB660019AEE7 /* AllPassSubscriptionViewController.swift in Sources */, 3488B01A1E9D0B230068AFD8 /* UIColor+Modifications.swift in Sources */, 34E50DD81F6FCAB1008EED49 /* UGCSummaryRatingCell.swift in Sources */, + 1185C52C23BB53A7004BF349 /* UIViewControllerRenderer.swift in Sources */, 6741AA281BF340DE002C974C /* MWMAlert.mm in Sources */, F6E2FF571E097BA00083EBEC /* MWMMobileInternetViewController.m in Sources */, 47B06E0021BAAC270094CCAD /* GeoZoneTracker.swift in Sources */, 3404F4952028A1B80090E401 /* BMCPermissionsCell.swift in Sources */, + 991FCA2823B12201009AD684 /* CheckmarkRenderer.swift in Sources */, 340416441E7BED3900E2B6D6 /* PhotosTransitionAnimator.swift in Sources */, 479388F92395A4D3006ECACC /* ActionBarViewController.swift in Sources */, 34AB66261FC5AA330078E451 /* RouteManagerDimView.swift in Sources */,