JCCloudProgressView 0.1.1

JCCloudProgressView 0.1.1

Maintained by Jason Han.




  • By
  • JasonHan1990

JCCloudProgressView

Version License Platform

Example

Icon JCCloudProgressView is a progress indicator view with great graphics.

Screen record

Requirements

JCCloudProgressView works on iOS 8+ and requires ARC to build. It depends on the following Apple frameworks:

Foundation.framework UIKit.framework CoreGraphics.framework

Installation

JCCloudProgressView is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'JCCloudProgressView'

Then Run pod install

How to use

Storyboard

You can create a JCCloudProgressView in storyboard by following steps:

  • Drag a UIView to your storyboard
  • Change the UIView class to JCCloudProgressView t-01
  • Now you should be able to see a JCCloudProgressView in your storyboard. sample
  • Change the properties in right side panel. t-02

Create with code

Of course, you can also create a JCCloudProgressView programmatically.

#import "JCCloudProgressView.h"

// Create a JCCloudProgressView
JCCloudProgressView *progressView = [[JCCloudProgressView alloc] init];

Parameters

/**
 * Cloud layer fill color.
 * Default is [UIColor colorWithRed:0.9 green: 0.9 blue:0.9 alpha:1].
 */
@property (strong, nonatomic) IBInspectable UIColor *cloudColor;
/**
 * Gradient color A at location [0, 0]
 * Default is [UIColor colorWithRed:1 green:0 blue:0 alpha:0.5].
 */
@property (strong, nonatomic) IBInspectable UIColor *colorA;
/**
 * Gradient color B at location [1, 1]
 * Default is [UIColor colorWithRed:0 green:0 blue:1 alpha:0.5].
 */
@property (strong, nonatomic) IBInspectable UIColor *colorB;
/**
 * Progress level. From 0.0 to 1.0. Default is 0.0.
 */
@property (assign, nonatomic) IBInspectable double progress;

Methods

/**
 * Start the wave layers animation.
 *
 * @note This method adds CABasicAnimation to both wave layers.
 */
- (void)startWaveRollingAnimation;

/**
 * Start the wave layers animation.
 *
 * @note This method removes CABasicAnimation to both wave layers.
 */
- (void)stopWaveRollingAnimation;

/**
 * Update the progress without animation.
 *
 * @param progress From 0.0 to 1.0.
 */
- (void)updateProgress:(double)progress;
/**
 * Update the progress.
 *
 * @param progress From 0.0 to 1.0.
 * @param animated Animated the progress update. YES or NO.
 */
- (void)updateProgress:(double)progress animated:(BOOL)animated;

Author

JasonHan1990, [email protected]

License

JCCloudProgressView is available under the MIT license. See the LICENSE file for more info.