Skip to content

zztmmzz/SPWaterWaveProgressIndicatorView

 
 

Repository files navigation

SPWaterProgressIndicatorView

This is custom subclass of UIView, which indicates the progress of task in percent.

What it looks like?

Presentation

Directory

  • SPWaterProgressIndicatorView_README.md
  • SPWaterProgressIndicatorView.hm
  • SPWaterProgressIndicatorView.swift
  • WaterWaveDemo project demostrates how to use this class in Objective-C Project.
  • WaterWaveDemo_Swift project demostrates how to use this class in Swift Project.

How to user it?

  • Add SPWaterProgressIndicatorView.hm files to the project.
  • There are two ways to use this class:
    • Specify a UIView's class as SPWaterProgressIndicatorView in IB.
    • Using alloc | initWithFrame: (Objective-C) to create and initialize an instance, then add it to a UIView.
    • Using UIView | init(frame: CGRect) (Swift) to create and initialize an instance, then add it to a UIView.

Objective-C

- (void)viewDidLoad {
    [super viewDidLoad];
    self.waterView = [[SPWaterProgressIndicatorView alloc] initWithFrame:self.view.bounds];
    self.waterView.center = self.view.center;
    [self.view addSubview:self.waterView];
    
}

Swift

override func viewDidLoad() {
    super.viewDidLoad()
        
    self.wave = SPWaterProgressIndicatorView(frame: self.view.bounds)
    self.wave.center = self.view.center;
    self.view.addSubview(self.wave)        
}

Version

1.0

Reference & Thanks

About

An iOS Custom Water Wave Progress Indicator View with Demo

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 47.4%
  • Objective-C 46.3%
  • Ruby 6.3%