Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 30 additions & 30 deletions libTest/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,63 +9,63 @@
import UIKit

class ViewController: UIViewController {

var tapCount = 0

@IBOutlet weak var activityView: activityIndicator!

override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.

// activityView.lineWidth = 2
activityView.lineWidth = 2
self.startAction(self)
}

override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}

@IBAction func startAction(sender: AnyObject) {
@IBAction func startAction(_ sender: AnyObject) {
activityView.startLoading()

}

@IBAction func progressAction(sender: AnyObject) {
@IBAction func progressAction(_ sender: AnyObject) {
let progress: Float = activityView.progress + 0.1043
activityView.progress = progress
}

@IBAction func successAction(sender: AnyObject) {
activityView.startLoading()
activityView.completeLoading(true)
@IBAction func successAction(_ sender: AnyObject) {
activityView.startLoading()
activityView.completeLoading(success: true)
}

@IBAction func unsucessAct(sender: AnyObject) {
activityView.startLoading()
activityView.strokeColor = UIColor.redColor()
activityView.completeLoading(false)
@IBAction func unsucessAct(_ sender: AnyObject) {
activityView.startLoading()
activityView.strokeColor = UIColor.red
activityView.completeLoading(success: false)
}
@IBAction func changeColorAct(sender: AnyObject) {
tapCount++
@IBAction func changeColorAct(_ sender: AnyObject) {
tapCount += 1

if (tapCount == 1){
activityView.strokeColor = UIColor.redColor()
}
activityView.strokeColor = UIColor.red }
else
if (tapCount == 2) {
activityView.strokeColor = UIColor.blackColor()
}
else
if (tapCount == 3) {
tapCount = 0
activityView.strokeColor = UIColor.purpleColor()

activityView.strokeColor = UIColor.black
}
else
if (tapCount == 3) {
tapCount = 0
activityView.strokeColor = UIColor.purple
}




}

}
Expand Down
Loading