TencentNavKit

TNKNaviTrafficBarWidget.h
Go to the documentation of this file.
1//
2// TNKNaviTrafficBarWidget.h
3// TencentNavKit
4//
5// Created by mol on 2019/6/22.
6// Copyright © 2019 Tencent. All rights reserved.
7//
8
9#import <UIKit/UIKit.h>
10#import <TencentNavKit/TNKDriveNavDelegate.h>
11//#import <TencentNavKit/TNKTravelNavDelegate.h>
12
13NS_ASSUME_NONNULL_BEGIN
14
15
19 typedef NS_ENUM(NSUInteger, TNKNaviTrafficBarWidgetOrientation)
20{
21 TNKNaviTrafficBarWidgetOrientationHorizontal = 0,
22 TNKNaviTrafficBarWidgetOrientationVertical = 1,
23};
24
28//@interface TNKNaviTrafficBarWidget : UIView<TNKDriveNavDelegate,TNKTravelNavDelegate>
29@interface TNKNaviTrafficBarWidget : UIView<TNKDriveNavDelegate>
30
34@property(nonatomic, assign) TNKNaviTrafficBarWidgetOrientation orientation;
35
39@property (nonatomic, strong) UIColor *borderColor;
40
44@property (nonatomic, assign) CGFloat borderWidth;
45
49@property (nonatomic, assign) CGFloat cornerRadius;
50
55@property (nonatomic, copy) NSDictionary<NSNumber *, UIColor *> *colorConfig;
56
57
58@property (nonatomic, copy) UIColor *labelColor;
59
65- (void)setCarIcon:(UIImage *)icon size:(CGSize)size;
66
67
68- (void)setTotalDistanceLabelColor:(UIColor *)totalDistanceLabelColor;
69
70- (instancetype)initWithFrame:(CGRect)frame orientation:(TNKNaviTrafficBarWidgetOrientation)orientation;
71
75@property (nonatomic, assign, getter=isWholeJourney) BOOL wholeJourney;
76
77@end
78
79NS_ASSUME_NONNULL_END
NS_ENUM
NS_ASSUME_NONNULL_BEGIN typedef NS_ENUM(NSUInteger, TNKNaviTrafficBarWidgetOrientation)
路况光柱图展示方向
Definition: TNKNaviTrafficBarWidget.h:19
TNKNaviTrafficBarWidget
路况光柱图
Definition: TNKNaviTrafficBarWidget.h:29
TNKNaviTrafficBarWidget::labelColor
UIColor * labelColor
Definition: TNKNaviTrafficBarWidget.h:58
TNKNaviTrafficBarWidget::orientation
TNKNaviTrafficBarWidgetOrientation orientation
视图展示方向，默认为TNKNaviTrafficBarWidgetOrientationHorizontal
Definition: TNKNaviTrafficBarWidget.h:34
TNKNaviTrafficBarWidget::borderColor
UIColor * borderColor
边框颜色
Definition: TNKNaviTrafficBarWidget.h:39
TNKNaviTrafficBarWidget::colorConfig
NSDictionary< NSNumber *, UIColor * > * colorConfig
交通状态的颜色 例如，@(TNKRouteTrafficDataStatusSmooth): [UIColor greenColor], @(TNKRouteTrafficDataStatusSlow)...
Definition: TNKNaviTrafficBarWidget.h:55
TNKNaviTrafficBarWidget::cornerRadius
CGFloat cornerRadius
圆角半径
Definition: TNKNaviTrafficBarWidget.h:49
TNKNaviTrafficBarWidget::wholeJourney
BOOL wholeJourney
光柱图是否表示全程，默认为YES。全程表示偏航后考虑偏航前行驶的里程，车标不会重新回到光柱图底部。
Definition: TNKNaviTrafficBarWidget.h:75
TNKNaviTrafficBarWidget::borderWidth
CGFloat borderWidth
边框宽度
Definition: TNKNaviTrafficBarWidget.h:44