YLProgressBar Class Reference
| Inherits from | UIView |
| Declared in | YLProgressBar.h |
Overview
The YLProgressBar is an UIProgressView replacement with an highly and fully customizable animated progress bar.
The YLProgressBar class provides properties for managing the style of the track and the progress bar, managun its behavior and for getting and setting values that are pinned to the progress of a task.
Unlike the UIProgressView, the YLProgressBar can be used for as an indeterminate progress indicator thanks to its pre-made behaviors.
Note: The YLProgressBar is conform to the UIAppearance protocol, however, because of the current version of the appledoc project, the UI_APPEARANCE_SELECTOR macros are not taken into account, that’s why they are commented.
Tasks
Managing the Progress Bar
-
progressproperty -
– setProgress:animated:
Modifying the Progress Bar’s Behavior
-
behaviorproperty
Configuring the Progress Bar
-
hideGlossproperty -
progressTintColorsproperty -
progressTintColorproperty -
trackTintColorproperty -
indicatorTextLabelproperty -
indicatorTextDisplayModeproperty -
typeproperty
Configuring the Stripes
-
stripesAnimatedproperty -
stripesDirectionproperty -
stripesAnimationVelocityproperty -
stripesOrientationproperty -
stripesWidthproperty -
stripesColorproperty -
stripesDeltaproperty -
hideStripesproperty
Properties
behavior
The behavior of the progress bar. A behavior defines how the progress bar needs to react in certain cases. For example the “default” behavior of the progress bar displays the stripes everytime whereas the “waiting” behavior displays them only when the progress value is nearby the max value.
@property (nonatomic, assign) YLProgressBarBehavior behaviorDiscussion
The default value is YLProgressBarBehaviorDefault.
Declared In
YLProgressBar.hhideGloss
A Boolean value that determines whether the gloss effet is hidden.
@property (nonatomic, assign) BOOL hideGlossDiscussion
Setting the value of this property to YES hides the gloss effect
and setting it to NO shows the gloss effect whatever the progress type
(YLProgressBarTypeRounded or YLProgressBarTypeFlat). The value is updated
each time the type change.
Declared In
YLProgressBar.hhideStripes
A Boolean value that determines whether the stripes are hidden.
@property (nonatomic, assign) BOOL hideStripesDiscussion
Setting the value of this property to YES hides the stripes and setting it to NO shows the stripes. The default value is NO.
Declared In
YLProgressBar.hindicatorTextDisplayMode
The display indicator text mode. It defines where the indicator text needs to display.
@property (nonatomic, assign) YLProgressBarIndicatorTextDisplayMode indicatorTextDisplayModeDiscussion
The default value is set to
YLProgressBarIndicatorTextDisplayModeNone.
Declared In
YLProgressBar.hindicatorTextLabel
A label to display some indications for the user. When the label text is set to nil it shows the progress value as a percentage. You can configure its font color, the font size, the text alignement, etc. as any other labels.
@property (nonatomic, strong) UILabel *indicatorTextLabelDiscussion
By default the label text is set to nil and its text color change using the background color.
Declared In
YLProgressBar.hprogress
The current progress shown by the receiver.
@property (atomic, assign) CGFloat progressDiscussion
The current progress is represented by a floating-point value between 0.0 and 1.0, inclusive, where 1.0 indicates the completion of the task.
The default value is 0.0. Values less than 0.0 and greater than 1.0 are pinned to those limits.
Declared In
YLProgressBar.hprogressTintColor
The color shown for the portion of the progress bar that is filled.
@property (nonatomic, strong) UIColor *progressTintColorDeclared In
YLProgressBar.hprogressTintColors
The colors shown for the portion of the progress bar that is filled.
@property (nonatomic, strong) NSArray *progressTintColorsDiscussion
All the colors in the array are drawn as a gradient visual of equal size.
Declared In
YLProgressBar.hstripesAnimated
The animated vs. nonanimated stripes of the progress bar.
@property (nonatomic, getter=isStripesAnimated) BOOL stripesAnimatedDiscussion
If YES, the stripes over the progress bar is moving from the left to the right side.
The default value for this property is YES.
Declared In
YLProgressBar.hstripesAnimationVelocity
The velocity of the stripes during the animation. Higher is the value, greater the distance traveled by the stripes during a frame is.
@property (nonatomic, assign) double stripesAnimationVelocityDiscussion
The absolute value of the property is taken into account. By
default the velocity is 1.
Declared In
YLProgressBar.hstripesColor
The color show for the stripes over the progress bar.
@property (nonatomic, strong) UIColor *stripesColorDeclared In
YLProgressBar.hstripesDelta
The x-coordinate distance in pixels between the top point and the bottom point of a slanted stripe.
@property (nonatomic, assign) NSInteger stripesDeltaDiscussion
Default value is YLProgressBarDefaultStripeDelta. Positive
integers are expected for correct effect. Has no effect when
stripesOrientation property is YLProgressBarStripesOrientationVertical.
Declared In
YLProgressBar.hstripesDirection
The direction of the movement during the animation.
@property (nonatomic, assign) YLProgressBarStripesDirection stripesDirectionDiscussion
The default value for this property is
YLProgressBarStripesDirectionRight.
Declared In
YLProgressBar.hstripesOrientation
The orientation of the stripes.
@property (nonatomic, assign) YLProgressBarStripesOrientation stripesOrientationDiscussion
The default value for this property is
YLProgressBarStripesOrientationRight.
Declared In
YLProgressBar.hstripesWidth
The width of the stripes drawn over the progress bar.
@property (nonatomic, assign) NSInteger stripesWidthDiscussion
If the property is less or equal than 0 the sprites are hidden.
The default value for this property is equal to the
YLProgressBarDefaultStripeWidth value.
Declared In
YLProgressBar.htrackTintColor
The color shown for the portion of the progress bar that is not filled.
@property (nonatomic, strong) UIColor *trackTintColorDeclared In
YLProgressBar.htype
The type of the progress bar.
@property (nonatomic, assign) YLProgressBarType typeDiscussion
The default value is set to YLProgressBarTypeRounded.
Declared In
YLProgressBar.hInstance Methods
setProgress:animated:
Adjusts the current progress shown by the receiver, optionally animating the change.
- (void)setProgress:(CGFloat)progress animated:(BOOL)animatedParameters
- progress
The new progress value.
- animated
YES if the change should be animated, NO if the change should happen immediately.
Discussion
The current progress is represented by a floating-point value between 0.0 and 1.0, inclusive, where 1.0 indicates the completion of the task. The default value is 0.0. Values less than 0.0 and greater than 1.0 are pinned to those limits.
Declared In
YLProgressBar.h