Skip to content

Commit

Permalink
some changes and fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinjahanmanesh committed Feb 14, 2019
1 parent aa3f46f commit 734333e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion loady/LoadingButton/Loady.swift
Expand Up @@ -926,6 +926,7 @@ extension Loady {
downloadLabel.string = downloadedOption.title
downloadLabel.foregroundColor = downloadedOption.textColor.cgColor
downloadLabel.font = downloadedOption.font
downloadLabel.position.x = self.layer.position.x
downloadLabel.fontSize = downloadedOption.font.pointSize
let animation = createTextPushAnimation(type: .fromTop, duration: 0.3)
downloadLabel.add(animation, forKey:"changeTextTransition")
Expand All @@ -938,7 +939,7 @@ extension Loady {
let size = CGSize(width: self.bounds.width, height: 30)
containerLayer.bounds = CGRect(x: 0, y: 0, width: size.width, height: size.height)
containerLayer.position.x = containerLayer.bounds.midX
containerLayer.position.y = self.bounds.height + size.height / 2
containerLayer.position.y = (self.bounds.height + size.height / 2) + 8
//layer.backgroundColor = UIColor.green.cgColor
let text = createTextLayers(layer:containerLayer,string: "\(_percentFilled)%", font: labelOption.percentageLabel!.font)
text.foregroundColor = labelOption.percentageLabel!.textColor.cgColor
Expand Down
6 changes: 3 additions & 3 deletions loady/ViewController.swift
Expand Up @@ -41,9 +41,9 @@ class ViewController: UIViewController {

// setup details
self.downloading?.animationsOptions.downloading = LoadyAnimationOptions.Downloading.init(
downloadingLabel: (title: "Copying Data", font: UIFont.boldSystemFont(ofSize: 18), textColor : UIColor(red:0, green:0.71, blue:0.8, alpha:1)),
downloadingLabel: (title: "Copying Data...", font: UIFont.boldSystemFont(ofSize: 18), textColor : UIColor(red:0, green:0.71, blue:0.8, alpha:1)),
percentageLabel: (font: UIFont.boldSystemFont(ofSize: 14), textColor : UIColor(red:0, green:0.71, blue:0.8, alpha:1)),
downloadedLabel: (title: "Completed ^_^", font: UIFont.boldSystemFont(ofSize: 20), textColor : UIColor(red:0, green:0.71, blue:0.8, alpha:1))
downloadedLabel: (title: "Completed.", font: UIFont.boldSystemFont(ofSize: 20), textColor : UIColor(red:0, green:0.71, blue:0.8, alpha:1))
)

self.appstore?.pauseImage = UIImage(named: "pause-button")
Expand Down Expand Up @@ -155,7 +155,7 @@ class ViewController: UIViewController {
self.tempTimer4?.invalidate()
self.tempTimer4 = nil
self.tempTimer4 = Timer.scheduledTimer(withTimeInterval: 0.5, repeats: true){(t) in
percent += CGFloat.random(in: 0...5)
percent += CGFloat.random(in: 5...10)

button.fillTheButton(with: percent)
if percent > 105 {
Expand Down

0 comments on commit 734333e

Please sign in to comment.