[coloring] [ios] Fixed transport navigation coloring.

This commit is contained in:
Ilya Grechuhin 2017-12-08 17:16:58 +03:00
parent 6e13d5f268
commit b27a62f7e7
6 changed files with 15 additions and 16 deletions

View file

@ -11,7 +11,6 @@
@property(copy, nonatomic, readwrite) NSArray<MWMRouterTransitStepInfo *> * transitSteps;
@property(copy, nonatomic, readwrite) NSAttributedString * estimate;
@property(copy, nonatomic, readwrite) NSAttributedString * estimateDot;
@property(copy, nonatomic, readwrite) NSString * distanceToTurn;
@property(copy, nonatomic, readwrite) NSString * streetName;
@property(copy, nonatomic, readwrite) NSString * targetDistance;
@ -55,13 +54,11 @@
- (NSAttributedString *)estimateDot
{
if (!_estimateDot)
{
auto attributes = @{NSForegroundColorAttributeName : [UIColor blackSecondaryText],
NSFontAttributeName : [UIFont medium17]};
_estimateDot = [[NSAttributedString alloc] initWithString:@" • " attributes:attributes];
}
return _estimateDot;
auto attributes = @{
NSForegroundColorAttributeName: [UIColor blackSecondaryText],
NSFontAttributeName: [UIFont medium17]
};
return [[NSAttributedString alloc] initWithString:@" • " attributes:attributes];
}
@end

View file

@ -107,6 +107,8 @@ using Observers = NSHashTable<Observer>;
[_navigationControlView mwm_refreshUI];
[_baseRoutePreviewStatus mwm_refreshUI];
[_transportRoutePreviewStatus mwm_refreshUI];
_etaAttributes = nil;
_etaSecondaryAttributes = nil;
}
- (void)onNavigationInfoUpdated

View file

@ -1,6 +1,6 @@
final class TransportTransitIntermediatePoint: TransportTransitCell {
enum Config {
static let imageColor = UIColor.primary()!
static var imageColor: UIColor { return UIColor.primary()! }
}
@IBOutlet private weak var image: UIImageView!

View file

@ -1,8 +1,8 @@
final class TransportTransitPedestrian: TransportTransitCell {
enum Config {
static let backgroundCornerRadius = CGFloat(4)
static let backgroundColor = UIColor.blackOpaque()!
static let imageColor = UIColor.blackSecondaryText()!
static let backgroundCornerRadius: CGFloat = 4
static var backgroundColor: UIColor { return UIColor.blackOpaque()! }
static var imageColor: UIColor { return UIColor.blackSecondaryText()! }
}
@IBOutlet private weak var background: UIView! {

View file

@ -1,6 +1,6 @@
final class TransportTransitSeparator: UICollectionReusableView {
enum Config {
static let imageColor = UIColor.blackSecondaryText()!
static var imageColor: UIColor { return UIColor.blackSecondaryText()! }
}
override init(frame: CGRect) {

View file

@ -1,9 +1,9 @@
final class TransportTransitTrain: TransportTransitCell {
enum Config {
static let backgroundCornerRadius = CGFloat(4)
static let labelTextColor = UIColor.white
static let backgroundCornerRadius: CGFloat = 4
static var labelTextColor: UIColor { return .white }
static let labelTextFont = UIFont.bold12()!
static let labelTrailing = CGFloat(4)
static let labelTrailing: CGFloat = 4
}
@IBOutlet private weak var background: UIView! {