AWFTimelineView
Objective-C
@interface AWFTimelineView : UIView
Swift
class AWFTimelineView : UIView
An AWFTimelineView is a view that provides a play/stop control, the current date and time and a scrubbable timeline slider bar for use with animatable weather
data layers on an AWFWeatherMap instance.
-
The current date and time being displayed. Setting this value will automatically update the day and time labels with the specified date.
Declaration
Objective-C
@property (nonatomic, strong) NSDate *currentTime;Swift
var currentTime: Date! { get set } -
The starting date and time for the animation timeline. This should correspond to the
timelineStartDateproperty onAWFWeatherMap.Declaration
Objective-C
@property (nonatomic, strong) NSDate *startDate;Swift
var startDate: Date! { get set } -
The ending date and time for the animation timeline. This should correspond to the
timelineEndDateproperty onAWFWeatherMap.Declaration
Objective-C
@property (nonatomic, strong) NSDate *endDate;Swift
var endDate: Date! { get set } -
The current animation position along the timeline, from
0.0(beginning) to1.0(end).Declaration
Objective-C
@property (nonatomic, readonly) CGFloat position;Swift
var position: CGFloat { get } -
The timeline bar view.
Declaration
Objective-C
@property (nonatomic, strong, readonly) AWFTimelineBarView *barView;Swift
var barView: AWFTimelineBarView! { get } -
The circular view indicating the timeline’s current position.
Declaration
Objective-C
@property (nonatomic, strong, readonly) AWFTimelinePositionView *positionView;Swift
var positionView: AWFTimelinePositionView! { get } -
The play button used to start and stop an animation. If an animation is currently playing, this button will update to a stop icon instead.
Declaration
Objective-C
@property (nonatomic, strong, readonly) UIButton *playButton;Swift
var playButton: UIButton! { get } -
Used to update the timeline position immediately to the current date and time.
Declaration
Objective-C
@property (nonatomic, strong, readonly) UIButton *nowButton;Swift
var nowButton: UIButton! { get } -
Whether or not the animation and timeline are currently playing.
Declaration
Objective-C
@property (nonatomic, getter=isPlaying) BOOL playing;Swift
var isPlaying: Bool { get set } -
The receiver’s delegate.
A timeline view informs its delegates about changes to the currently selected date.
Declaration
Objective-C
@property (nonatomic, weak) id<AWFTimelineViewDelegate> delegate;Swift
weak var delegate: AWFTimelineViewDelegate! { get set } -
Whether or not to display the loading indicator on the timeline view. This is used when data has to be requested from a remote source before an animation can begin playback.
Declaration
Objective-C
- (void)showLoading:(BOOL)loading;Swift
func showLoading(_ loading: Bool)Parameters
loadingA Boolean indicating whether or not to display the loading indicator.
-
Updates the timeline loading progress position based on the download progress when requesting remote data required for the animation.
Declaration
Objective-C
- (void)setProgress:(CGFloat)progress animated:(BOOL)animated;Swift
func setProgress(_ progress: CGFloat, animated: Bool)Parameters
progressThe download progress of animation data, from
0.0(none) to1.0(complete).animatedA Boolean indicating whether or not the update should be animated.
-
Sets the block to use when formatting the string value displayed in the primary text label. The default formatter displays the current date/time as a 12-hour time value.
Declaration
Objective-C
- (void)setTextLabelFormatter:(AWFTimelineDateFormatter)formatter;Swift
func setTextLabelFormatter(_ formatter: AWFTimelineDateFormatter!)Parameters
formatterThe formatter block that formats the provided
NSDateto the desired string value. -
Sets the block to use when formatting the string value displayed in the detail text label. The default formatter displays the current day name.
Declaration
Objective-C
- (void)setDetailTextLabelFormatter:(AWFTimelineDateFormatter)formatter;Swift
func setDetailTextLabelFormatter(_ formatter: AWFTimelineDateFormatter!)Parameters
formatterThe formatter block that formats the provided
NSDateto the desired string value. -
Updates the timeline’s position indicator view to the current date and time along the timeline.
Declaration
Objective-C
- (void)updatePositionForCurrentTime;Swift
func updatePositionForCurrentTime()
View on GitHub
AWFTimelineView Class Reference