AWFTimelineView
@interface 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 (readwrite, strong, nonatomic) NSDate *currentTime;
Swift
var currentTime: Date! { get set }
-
The starting date and time for the animation timeline. This should correspond to the
timelineStartDate
property onAWFWeatherMap
.Declaration
Objective-C
@property (readwrite, strong, nonatomic) NSDate *startDate;
Swift
var startDate: Date! { get set }
-
The ending date and time for the animation timeline. This should correspond to the
timelineEndDate
property onAWFWeatherMap
.Declaration
Objective-C
@property (readwrite, strong, nonatomic) 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 (readonly, assign, nonatomic) CGFloat position;
Swift
var position: CGFloat { get }
-
The timeline bar view.
Declaration
Objective-C
@property (readonly, strong, nonatomic) AWFTimelineBarView *barView;
Swift
var barView: AWFTimelineBarView! { get }
-
The circular view indicating the timeline’s current position.
Declaration
Objective-C
@property (readonly, strong, nonatomic) 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 (readonly, strong, nonatomic) UIButton *playButton;
Swift
var playButton: UIButton! { get }
-
Used to update the timeline position immediately to the current date and time.
Declaration
Objective-C
@property (readonly, strong, nonatomic) UIButton *nowButton;
Swift
var nowButton: UIButton! { get }
-
Whether or not the animation and timeline are currently playing.
Declaration
Objective-C
@property (getter=isPlaying, assign, readwrite, nonatomic) 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 (assign, readwrite, nonatomic) id<AWFTimelineViewDelegate> delegate;
Swift
unowned(unsafe) 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
loading
A 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
progress
The download progress of animation data, from
0.0
(none) to1.0
(complete).animated
A Boolean indicating whether or not the update should be animated.
-
Updates the timeline’s position indicator view to the current date and time along the timeline.
Declaration
Objective-C
- (void)updatePositionForCurrentTime;
Swift
func updatePositionForCurrentTime()