Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // ViewController.swift
- // TestProduct
- //
- // Created by Yan Olerinskiy on 01/07/2019.
- // Copyright © 2019 Yan Olerinskiy. All rights reserved.
- //
- import UIKit
- class ViewController: UIViewController {
- @IBOutlet weak var progress: UIProgressView!
- @IBOutlet weak var button: UIButton!
- override func viewDidLoad() {
- super.viewDidLoad()
- // Do any additional setup after loading the view, typically from a nib.
- progress.transform = progress.transform.scaledBy(x: 1, y: 8)
- progress.trackTintColor = UIColor(red: 1.0, green: 0.4, blue: 0.4, alpha: 1.0)
- progress.progress = 0
- }
- @IBAction func button(_ sender: Any) {
- progress.progress = Float.random(in: 0...100)/100
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement