├── .swift-version
├── Screenshots
├── demo.gif
└── designer.png
├── LinearProgressViewExample
├── Podfile
├── LinearProgressViewExample.xcodeproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── project.pbxproj
└── LinearProgressViewExample
│ ├── Info.plist
│ ├── ViewController.swift
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ └── AppDelegate.swift
├── Source
├── LinearProgressView.h
├── Info.plist
└── LinearProgressView.swift
├── LinearProgressView.podspec
├── LICENSE
├── README.md
├── LinearProgressView.xcodeproj
├── xcshareddata
│ └── xcschemes
│ │ └── LinearProgressView.xcscheme
└── project.pbxproj
└── .gitignore
/.swift-version:
--------------------------------------------------------------------------------
1 | 4.1
--------------------------------------------------------------------------------
/Screenshots/demo.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BiAtoms/LinearProgressView/HEAD/Screenshots/demo.gif
--------------------------------------------------------------------------------
/Screenshots/designer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BiAtoms/LinearProgressView/HEAD/Screenshots/designer.png
--------------------------------------------------------------------------------
/LinearProgressViewExample/Podfile:
--------------------------------------------------------------------------------
1 | platform :ios, '8.0'
2 |
3 | target 'LinearProgressViewExample' do
4 | use_frameworks!
5 |
6 | pod 'LinearProgressView', :path => '../'
7 |
8 | end
9 |
--------------------------------------------------------------------------------
/LinearProgressViewExample/LinearProgressViewExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/LinearProgressViewExample/LinearProgressViewExample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Source/LinearProgressView.h:
--------------------------------------------------------------------------------
1 | //
2 | // LinearProgressView.h
3 | // LinearProgressView
4 | //
5 | // Created by Orkhan Alikhanov on 4/12/17.
6 | // Copyright © 2017 BiAtoms. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | FOUNDATION_EXPORT double LinearProgressViewVersionNumber;
12 | FOUNDATION_EXPORT const unsigned char LinearProgressViewVersionString[];
13 |
14 |
15 |
--------------------------------------------------------------------------------
/LinearProgressView.podspec:
--------------------------------------------------------------------------------
1 | Pod::Spec.new do |s|
2 | s.name = 'LinearProgressView'
3 | s.version = '2.0.1'
4 | s.summary = 'A simple linear progress bar.'
5 | s.homepage = 'https://github.com/BiAtoms/LinearProgressView'
6 | s.license = { :type => 'MIT', :file => 'LICENSE' }
7 | s.author = { 'Orkhan Alikhanov' => 'orkhan.alikhanov@gmail.com' }
8 | s.source = { :git => 'https://github.com/BiAtoms/LinearProgressView.git', :tag => s.version.to_s }
9 |
10 | s.ios.deployment_target = '8.0'
11 | s.source_files = 'Source/*.swift'
12 | end
13 |
--------------------------------------------------------------------------------
/Source/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | $(CURRENT_PROJECT_VERSION)
21 | NSPrincipalClass
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 BiAtoms
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/LinearProgressViewExample/LinearProgressViewExample/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/LinearProgressViewExample/LinearProgressViewExample/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // LinearProgressViewExample
4 | //
5 | // Created by Orkhan Alikhanov on 4/12/17.
6 | // Copyright © 2017 BiAtoms. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import LinearProgressView
11 |
12 | class ViewController: UIViewController {
13 |
14 | @IBOutlet var progressSlider: UISlider!
15 | @IBOutlet var barInsetSlider: UISlider!
16 | @IBOutlet var isCornerRoundedSwitch: UISwitch!
17 |
18 | @IBOutlet var linearProgressView: LinearProgressView!
19 | override func viewDidLoad() {
20 | super.viewDidLoad()
21 |
22 | linearProgressView.animationDuration = 0.5
23 |
24 | progressSlider.addTarget(self, action: #selector(updateLinearProgressView), for: .valueChanged)
25 | barInsetSlider.addTarget(self, action: #selector(updateLinearProgressView), for: .valueChanged)
26 | isCornerRoundedSwitch.addTarget(self, action: #selector(updateLinearProgressView), for: .valueChanged)
27 | }
28 |
29 | @objc
30 | func updateLinearProgressView() {
31 | linearProgressView.setProgress( progressSlider.value, animated: true)
32 | linearProgressView.barInset = CGFloat(barInsetSlider.value)
33 | linearProgressView.isCornersRounded = isCornerRoundedSwitch.isOn
34 | }
35 | @IBAction func didTapRandomColorButton(_ sender: Any) {
36 | linearProgressView.barColor = .random
37 | linearProgressView.trackColor = .random
38 | }
39 | }
40 |
41 | extension CGFloat {
42 | static func random() -> CGFloat {
43 | return CGFloat(arc4random()) / CGFloat(UInt32.max)
44 | }
45 | }
46 |
47 |
48 | extension UIColor {
49 | static var random: UIColor {
50 | return UIColor(red: .random(), green: .random(), blue: .random(), alpha: 1.0)
51 | }
52 | }
53 |
54 |
--------------------------------------------------------------------------------
/LinearProgressViewExample/LinearProgressViewExample/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/LinearProgressViewExample/LinearProgressViewExample/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "20x20",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "20x20",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "29x29",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "29x29",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "40x40",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "40x40",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "size" : "60x60",
36 | "scale" : "2x"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "size" : "60x60",
41 | "scale" : "3x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "20x20",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "20x20",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "29x29",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "29x29",
61 | "scale" : "2x"
62 | },
63 | {
64 | "idiom" : "ipad",
65 | "size" : "40x40",
66 | "scale" : "1x"
67 | },
68 | {
69 | "idiom" : "ipad",
70 | "size" : "40x40",
71 | "scale" : "2x"
72 | },
73 | {
74 | "idiom" : "ipad",
75 | "size" : "76x76",
76 | "scale" : "1x"
77 | },
78 | {
79 | "idiom" : "ipad",
80 | "size" : "76x76",
81 | "scale" : "2x"
82 | },
83 | {
84 | "idiom" : "ipad",
85 | "size" : "83.5x83.5",
86 | "scale" : "2x"
87 | }
88 | ],
89 | "info" : {
90 | "version" : 1,
91 | "author" : "xcode"
92 | }
93 | }
--------------------------------------------------------------------------------
/LinearProgressViewExample/LinearProgressViewExample/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // LinearProgressViewExample
4 | //
5 | // Created by Orkhan Alikhanov on 4/12/17.
6 | // Copyright © 2017 BiAtoms. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 |
14 | var window: UIWindow?
15 |
16 |
17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
18 | // Override point for customization after application launch.
19 | return true
20 | }
21 |
22 | func applicationWillResignActive(_ application: UIApplication) {
23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
24 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
25 | }
26 |
27 | func applicationDidEnterBackground(_ application: UIApplication) {
28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
30 | }
31 |
32 | func applicationWillEnterForeground(_ application: UIApplication) {
33 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
34 | }
35 |
36 | func applicationDidBecomeActive(_ application: UIApplication) {
37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
38 | }
39 |
40 | func applicationWillTerminate(_ application: UIApplication) {
41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
42 | }
43 |
44 |
45 | }
46 |
47 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [](https://github.com/BiAtoms/LinearProgressView)
2 | [](https://cocoapods.org/pods/LinearProgressView)
3 | [](https://github.com/Carthage/Carthage)
4 | [](https://github.com/BiAtoms/LinearProgressView/blob/master/LICENSE)
5 |
6 | # LinearProgressView
7 |
8 | A simple progress view for iOS
9 |
10 |

11 |

12 |
13 |
14 | ## Requirements
15 |
16 | - iOS 8.0+
17 | - Xcode 8.0+
18 | - Swift 3.0+
19 |
20 | ## Installation
21 |
22 | ### CocoaPods
23 |
24 | [CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command:
25 |
26 | ```bash
27 | $ gem install cocoapods
28 | ```
29 |
30 | To integrate LinearProgressView into your Xcode project using CocoaPods, specify it in your `Podfile`:
31 |
32 | ```ruby
33 | source 'https://github.com/CocoaPods/Specs.git'
34 | platform :ios, '8.0'
35 | use_frameworks!
36 |
37 | target '' do
38 | pod 'LinearProgressView', '~> 2.0'
39 | end
40 | ```
41 |
42 | Then, run the following command:
43 |
44 | ```bash
45 | $ pod install
46 | ```
47 |
48 | ### Carthage
49 |
50 | [Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.
51 |
52 | You can install Carthage with [Homebrew](http://brew.sh/) using the following command:
53 |
54 | ```bash
55 | $ brew update
56 | $ brew install carthage
57 | ```
58 |
59 | To integrate LinearProgressView into your Xcode project using Carthage, specify it in your `Cartfile`:
60 |
61 | ```ogdl
62 | github "BiAtoms/LinearProgressView" ~> 2.0
63 | ```
64 |
65 | Run `carthage update` to build the framework and drag the built `LinearProgressView.framework` into your Xcode project.
66 |
67 | ### Manually
68 |
69 | Just drag and drop the [Source/LinearProgressView.swift](https://github.com/BiAtoms/LinearProgressView/blob/master/Source/LinearProgressView.swift) file.
70 |
71 | ## Authors
72 |
73 | * **Orkhan Alikhanov** - *Initial work* - [OrkhanAlikhanov](https://github.com/OrkhanAlikhanov)
74 |
75 | See also the list of [contributors](https://github.com/BiAtoms/LinearProgressView/contributors) who participated in this project.
76 |
77 | ## License
78 |
79 | This project is licensed under the MIT License - see the [LICENSE](https://github.com/BiAtoms/LinearProgressView/blob/master/LICENSE) file for details
80 |
--------------------------------------------------------------------------------
/LinearProgressView.xcodeproj/xcshareddata/xcschemes/LinearProgressView.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
34 |
35 |
45 |
46 |
52 |
53 |
54 |
55 |
56 |
57 |
63 |
64 |
70 |
71 |
72 |
73 |
75 |
76 |
79 |
80 |
81 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Created by https://www.gitignore.io/api/macos,swift,xcode,objective-c
2 |
3 | ### macOS ###
4 | *.DS_Store
5 | .AppleDouble
6 | .LSOverride
7 |
8 | # Icon must end with two \r
9 | Icon
10 |
11 |
12 | # Thumbnails
13 | ._*
14 |
15 | # Files that might appear in the root of a volume
16 | .DocumentRevisions-V100
17 | .fseventsd
18 | .Spotlight-V100
19 | .TemporaryItems
20 | .Trashes
21 | .VolumeIcon.icns
22 | .com.apple.timemachine.donotpresent
23 |
24 | # Directories potentially created on remote AFP share
25 | .AppleDB
26 | .AppleDesktop
27 | Network Trash Folder
28 | Temporary Items
29 | .apdisk
30 |
31 | ### Objective-C ###
32 | # Xcode
33 | #
34 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
35 |
36 | ## Build generated
37 | build/
38 | DerivedData/
39 |
40 | ## Various settings
41 | *.pbxuser
42 | !default.pbxuser
43 | *.mode1v3
44 | !default.mode1v3
45 | *.mode2v3
46 | !default.mode2v3
47 | *.perspectivev3
48 | !default.perspectivev3
49 | xcuserdata/
50 |
51 | ## Other
52 | *.moved-aside
53 | *.xccheckout
54 | *.xcscmblueprint
55 |
56 | ## Obj-C/Swift specific
57 | *.hmap
58 | *.ipa
59 | *.dSYM.zip
60 | *.dSYM
61 |
62 | # CocoaPods
63 | #
64 | # We recommend against adding the Pods directory to your .gitignore. However
65 | # you should judge for yourself, the pros and cons are mentioned at:
66 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
67 | #
68 | # Pods/
69 |
70 | # Carthage
71 | #
72 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
73 | # Carthage/Checkouts
74 |
75 | Carthage/Build
76 |
77 | # fastlane
78 | #
79 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
80 | # screenshots whenever they are needed.
81 | # For more information about the recommended setup visit:
82 | # https://docs.fastlane.tools/best-practices/source-control/#source-control
83 |
84 | fastlane/report.xml
85 | fastlane/Preview.html
86 | fastlane/screenshots
87 | fastlane/test_output
88 |
89 | # Code Injection
90 | #
91 | # After new code Injection tools there's a generated folder /iOSInjectionProject
92 | # https://github.com/johnno1962/injectionforxcode
93 |
94 | iOSInjectionProject/
95 |
96 | ### Objective-C Patch ###
97 |
98 | ### Swift ###
99 | # Xcode
100 | #
101 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
102 |
103 | ## Build generated
104 |
105 | ## Various settings
106 |
107 | ## Other
108 |
109 | ## Obj-C/Swift specific
110 |
111 | ## Playgrounds
112 | timeline.xctimeline
113 | playground.xcworkspace
114 |
115 | # Swift Package Manager
116 | #
117 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
118 | # Packages/
119 | # Package.pins
120 | .build/
121 |
122 | # CocoaPods
123 | #
124 | # We recommend against adding the Pods directory to your .gitignore. However
125 | # you should judge for yourself, the pros and cons are mentioned at:
126 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
127 | #
128 | # Pods/
129 |
130 | # Carthage
131 | #
132 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
133 | # Carthage/Checkouts
134 |
135 |
136 | # fastlane
137 | #
138 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
139 | # screenshots whenever they are needed.
140 | # For more information about the recommended setup visit:
141 | # https://docs.fastlane.tools/best-practices/source-control/#source-control
142 |
143 |
144 | ### Xcode ###
145 | # Xcode
146 | #
147 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
148 |
149 | ## Build generated
150 |
151 | ## Various settings
152 |
153 | ## Other
154 |
155 | ### Xcode Patch ###
156 | *.xcodeproj/*
157 | !*.xcodeproj/project.pbxproj
158 | !*.xcodeproj/xcshareddata/
159 | !*.xcworkspace/contents.xcworkspacedata
160 | /*.gcno
161 |
162 | # End of https://www.gitignore.io/api/macos,swift,xcode,objective-c
--------------------------------------------------------------------------------
/Source/LinearProgressView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // LinearProgressView.swift
3 | // LinearProgressView
4 | //
5 | // Created by Orkhan Alikhanov on 4/12/17.
6 | // Copyright © 2017 BiAtoms. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @IBDesignable
12 | open class LinearProgressView: UIView {
13 |
14 | private let trackView = UIView()
15 | private lazy var trackViewWidthConstraint: NSLayoutConstraint = { NSLayoutConstraint(item: self.trackView, attribute: .width, relatedBy: .equal, toItem: nil, attribute: .notAnAttribute, multiplier: 1.0, constant: 0) }()
16 |
17 | @IBInspectable
18 | open var barColor: UIColor = .gray {
19 | didSet {
20 | self.layer.backgroundColor = barColor.cgColor
21 | }
22 | }
23 |
24 | @IBInspectable
25 | open var trackColor: UIColor = .green {
26 | didSet {
27 | trackView.layer.backgroundColor = trackColor.cgColor
28 | }
29 | }
30 |
31 | @IBInspectable
32 | open var isCornersRounded: Bool = true {
33 | didSet {
34 | if !isCornersRounded {
35 | self.layer.cornerRadius = 0
36 | trackView.layer.cornerRadius = 0
37 | }
38 | layoutSubviews()
39 | }
40 | }
41 |
42 | @IBInspectable
43 | open var maximumValue: Float = 100.0 {
44 | didSet {
45 | progress = { progress }()
46 | }
47 | }
48 |
49 | @IBInspectable
50 | open var minimumValue: Float = 0.0 {
51 | didSet {
52 | progress = { progress }()
53 | }
54 | }
55 |
56 | @IBInspectable
57 | open private(set) var progress: Float = 0 {
58 | didSet {
59 | if progress > maximumValue {
60 | progress = maximumValue
61 | } else if progress < minimumValue {
62 | progress = minimumValue
63 | }
64 | layoutSubviews()
65 | }
66 | }
67 |
68 | @IBInspectable
69 | open var barInset: CGFloat = 0 {
70 | didSet {
71 | layoutSubviews()
72 | }
73 | }
74 |
75 | open var animationDuration: TimeInterval = 0.25
76 |
77 | override init(frame: CGRect) {
78 | super.init(frame: frame)
79 | prepare()
80 | }
81 |
82 | required public init?(coder aDecoder: NSCoder) {
83 | super.init(coder: aDecoder)
84 | prepare()
85 | }
86 |
87 | open func prepare() {
88 | self.addSubview(trackView)
89 |
90 | trackView.translatesAutoresizingMaskIntoConstraints = false
91 | NSLayoutConstraint.activate([
92 | NSLayoutConstraint(item: trackView, attribute: .left, relatedBy: .equal, toItem: self, attribute: .leftMargin, multiplier: 1.0, constant: 0),
93 | NSLayoutConstraint(item: trackView, attribute: .top, relatedBy: .equal, toItem: self, attribute: .topMargin, multiplier: 1.0, constant: 0),
94 | NSLayoutConstraint(item: trackView, attribute: .bottom, relatedBy: .equal, toItem: self, attribute: .bottomMargin, multiplier: 1.0, constant: 0),
95 | trackViewWidthConstraint
96 | ])
97 | self.layoutMargins = .zero
98 | }
99 |
100 | open func setProgress(_ value: Float, animated: Bool) {
101 | self.progress = value
102 |
103 | if animated {
104 | UIView.animate(withDuration: animationDuration, animations: {
105 | self.layoutIfNeeded()
106 | })
107 | }
108 | }
109 |
110 | override open func layoutSubviews() {
111 | super.layoutSubviews()
112 |
113 | let maxWidth: CGFloat = max(self.frame.width - barInset * 2, 0) // prevent from becoming negative
114 | let calculatedWidth: CGFloat = maximumValue - minimumValue != 0 ? CGFloat((progress - minimumValue) / (maximumValue - minimumValue)) * maxWidth : 0
115 | trackViewWidthConstraint.constant = calculatedWidth
116 | if isCornersRounded {
117 | self.layer.cornerRadius = self.frame.height / 2
118 | trackView.layer.cornerRadius = trackView.frame.height / 2
119 | }
120 |
121 | self.layoutMargins = UIEdgeInsets(top: barInset, left: barInset, bottom: barInset, right: barInset)
122 | }
123 | }
124 |
125 |
--------------------------------------------------------------------------------
/LinearProgressView.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 9DC6CB021E9E14770080A14B /* LinearProgressView.h in Headers */ = {isa = PBXBuildFile; fileRef = 9DC6CB001E9E14770080A14B /* LinearProgressView.h */; settings = {ATTRIBUTES = (Public, ); }; };
11 | 9DC6CB091E9E15AA0080A14B /* LinearProgressView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DC6CB081E9E15AA0080A14B /* LinearProgressView.swift */; };
12 | /* End PBXBuildFile section */
13 |
14 | /* Begin PBXFileReference section */
15 | 9DC6CAFD1E9E14770080A14B /* LinearProgressView.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = LinearProgressView.framework; sourceTree = BUILT_PRODUCTS_DIR; };
16 | 9DC6CB001E9E14770080A14B /* LinearProgressView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LinearProgressView.h; sourceTree = ""; };
17 | 9DC6CB011E9E14770080A14B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
18 | 9DC6CB081E9E15AA0080A14B /* LinearProgressView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LinearProgressView.swift; sourceTree = ""; };
19 | /* End PBXFileReference section */
20 |
21 | /* Begin PBXFrameworksBuildPhase section */
22 | 9DC6CAF91E9E14770080A14B /* Frameworks */ = {
23 | isa = PBXFrameworksBuildPhase;
24 | buildActionMask = 2147483647;
25 | files = (
26 | );
27 | runOnlyForDeploymentPostprocessing = 0;
28 | };
29 | /* End PBXFrameworksBuildPhase section */
30 |
31 | /* Begin PBXGroup section */
32 | 9DC6CAF31E9E14770080A14B = {
33 | isa = PBXGroup;
34 | children = (
35 | 9DC6CAFF1E9E14770080A14B /* Source */,
36 | 9DC6CAFE1E9E14770080A14B /* Products */,
37 | );
38 | sourceTree = "";
39 | };
40 | 9DC6CAFE1E9E14770080A14B /* Products */ = {
41 | isa = PBXGroup;
42 | children = (
43 | 9DC6CAFD1E9E14770080A14B /* LinearProgressView.framework */,
44 | );
45 | name = Products;
46 | sourceTree = "";
47 | };
48 | 9DC6CAFF1E9E14770080A14B /* Source */ = {
49 | isa = PBXGroup;
50 | children = (
51 | 9DC6CB081E9E15AA0080A14B /* LinearProgressView.swift */,
52 | 9DC6CB001E9E14770080A14B /* LinearProgressView.h */,
53 | 9DC6CB011E9E14770080A14B /* Info.plist */,
54 | );
55 | path = Source;
56 | sourceTree = "";
57 | };
58 | /* End PBXGroup section */
59 |
60 | /* Begin PBXHeadersBuildPhase section */
61 | 9DC6CAFA1E9E14770080A14B /* Headers */ = {
62 | isa = PBXHeadersBuildPhase;
63 | buildActionMask = 2147483647;
64 | files = (
65 | 9DC6CB021E9E14770080A14B /* LinearProgressView.h in Headers */,
66 | );
67 | runOnlyForDeploymentPostprocessing = 0;
68 | };
69 | /* End PBXHeadersBuildPhase section */
70 |
71 | /* Begin PBXNativeTarget section */
72 | 9DC6CAFC1E9E14770080A14B /* LinearProgressView */ = {
73 | isa = PBXNativeTarget;
74 | buildConfigurationList = 9DC6CB051E9E14770080A14B /* Build configuration list for PBXNativeTarget "LinearProgressView" */;
75 | buildPhases = (
76 | 9DC6CAF81E9E14770080A14B /* Sources */,
77 | 9DC6CAF91E9E14770080A14B /* Frameworks */,
78 | 9DC6CAFA1E9E14770080A14B /* Headers */,
79 | 9DC6CAFB1E9E14770080A14B /* Resources */,
80 | );
81 | buildRules = (
82 | );
83 | dependencies = (
84 | );
85 | name = LinearProgressView;
86 | productName = LinearProgressView;
87 | productReference = 9DC6CAFD1E9E14770080A14B /* LinearProgressView.framework */;
88 | productType = "com.apple.product-type.framework";
89 | };
90 | /* End PBXNativeTarget section */
91 |
92 | /* Begin PBXProject section */
93 | 9DC6CAF41E9E14770080A14B /* Project object */ = {
94 | isa = PBXProject;
95 | attributes = {
96 | LastUpgradeCheck = 0930;
97 | ORGANIZATIONNAME = BiAtoms;
98 | TargetAttributes = {
99 | 9DC6CAFC1E9E14770080A14B = {
100 | CreatedOnToolsVersion = 8.1;
101 | DevelopmentTeam = SLC8XA65WS;
102 | LastSwiftMigration = 0900;
103 | ProvisioningStyle = Automatic;
104 | };
105 | };
106 | };
107 | buildConfigurationList = 9DC6CAF71E9E14770080A14B /* Build configuration list for PBXProject "LinearProgressView" */;
108 | compatibilityVersion = "Xcode 3.2";
109 | developmentRegion = English;
110 | hasScannedForEncodings = 0;
111 | knownRegions = (
112 | en,
113 | );
114 | mainGroup = 9DC6CAF31E9E14770080A14B;
115 | productRefGroup = 9DC6CAFE1E9E14770080A14B /* Products */;
116 | projectDirPath = "";
117 | projectRoot = "";
118 | targets = (
119 | 9DC6CAFC1E9E14770080A14B /* LinearProgressView */,
120 | );
121 | };
122 | /* End PBXProject section */
123 |
124 | /* Begin PBXResourcesBuildPhase section */
125 | 9DC6CAFB1E9E14770080A14B /* Resources */ = {
126 | isa = PBXResourcesBuildPhase;
127 | buildActionMask = 2147483647;
128 | files = (
129 | );
130 | runOnlyForDeploymentPostprocessing = 0;
131 | };
132 | /* End PBXResourcesBuildPhase section */
133 |
134 | /* Begin PBXSourcesBuildPhase section */
135 | 9DC6CAF81E9E14770080A14B /* Sources */ = {
136 | isa = PBXSourcesBuildPhase;
137 | buildActionMask = 2147483647;
138 | files = (
139 | 9DC6CB091E9E15AA0080A14B /* LinearProgressView.swift in Sources */,
140 | );
141 | runOnlyForDeploymentPostprocessing = 0;
142 | };
143 | /* End PBXSourcesBuildPhase section */
144 |
145 | /* Begin XCBuildConfiguration section */
146 | 9DC6CB031E9E14770080A14B /* Debug */ = {
147 | isa = XCBuildConfiguration;
148 | buildSettings = {
149 | ALWAYS_SEARCH_USER_PATHS = NO;
150 | CLANG_ANALYZER_NONNULL = YES;
151 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
152 | CLANG_CXX_LIBRARY = "libc++";
153 | CLANG_ENABLE_MODULES = YES;
154 | CLANG_ENABLE_OBJC_ARC = YES;
155 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
156 | CLANG_WARN_BOOL_CONVERSION = YES;
157 | CLANG_WARN_COMMA = YES;
158 | CLANG_WARN_CONSTANT_CONVERSION = YES;
159 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
160 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
161 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
162 | CLANG_WARN_EMPTY_BODY = YES;
163 | CLANG_WARN_ENUM_CONVERSION = YES;
164 | CLANG_WARN_INFINITE_RECURSION = YES;
165 | CLANG_WARN_INT_CONVERSION = YES;
166 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
167 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
168 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
169 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
170 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
171 | CLANG_WARN_STRICT_PROTOTYPES = YES;
172 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
173 | CLANG_WARN_SUSPICIOUS_MOVES = YES;
174 | CLANG_WARN_UNREACHABLE_CODE = YES;
175 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
176 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
177 | COPY_PHASE_STRIP = NO;
178 | CURRENT_PROJECT_VERSION = 1;
179 | DEBUG_INFORMATION_FORMAT = dwarf;
180 | ENABLE_STRICT_OBJC_MSGSEND = YES;
181 | ENABLE_TESTABILITY = YES;
182 | GCC_C_LANGUAGE_STANDARD = gnu99;
183 | GCC_DYNAMIC_NO_PIC = NO;
184 | GCC_NO_COMMON_BLOCKS = YES;
185 | GCC_OPTIMIZATION_LEVEL = 0;
186 | GCC_PREPROCESSOR_DEFINITIONS = (
187 | "DEBUG=1",
188 | "$(inherited)",
189 | );
190 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
191 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
192 | GCC_WARN_UNDECLARED_SELECTOR = YES;
193 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
194 | GCC_WARN_UNUSED_FUNCTION = YES;
195 | GCC_WARN_UNUSED_VARIABLE = YES;
196 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
197 | MTL_ENABLE_DEBUG_INFO = YES;
198 | ONLY_ACTIVE_ARCH = YES;
199 | SDKROOT = iphoneos;
200 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
201 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
202 | TARGETED_DEVICE_FAMILY = "1,2";
203 | VERSIONING_SYSTEM = "apple-generic";
204 | VERSION_INFO_PREFIX = "";
205 | };
206 | name = Debug;
207 | };
208 | 9DC6CB041E9E14770080A14B /* Release */ = {
209 | isa = XCBuildConfiguration;
210 | buildSettings = {
211 | ALWAYS_SEARCH_USER_PATHS = NO;
212 | CLANG_ANALYZER_NONNULL = YES;
213 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
214 | CLANG_CXX_LIBRARY = "libc++";
215 | CLANG_ENABLE_MODULES = YES;
216 | CLANG_ENABLE_OBJC_ARC = YES;
217 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
218 | CLANG_WARN_BOOL_CONVERSION = YES;
219 | CLANG_WARN_COMMA = YES;
220 | CLANG_WARN_CONSTANT_CONVERSION = YES;
221 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
222 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
223 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
224 | CLANG_WARN_EMPTY_BODY = YES;
225 | CLANG_WARN_ENUM_CONVERSION = YES;
226 | CLANG_WARN_INFINITE_RECURSION = YES;
227 | CLANG_WARN_INT_CONVERSION = YES;
228 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
229 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
230 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
231 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
232 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
233 | CLANG_WARN_STRICT_PROTOTYPES = YES;
234 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
235 | CLANG_WARN_SUSPICIOUS_MOVES = YES;
236 | CLANG_WARN_UNREACHABLE_CODE = YES;
237 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
238 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
239 | COPY_PHASE_STRIP = NO;
240 | CURRENT_PROJECT_VERSION = 1;
241 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
242 | ENABLE_NS_ASSERTIONS = NO;
243 | ENABLE_STRICT_OBJC_MSGSEND = YES;
244 | GCC_C_LANGUAGE_STANDARD = gnu99;
245 | GCC_NO_COMMON_BLOCKS = YES;
246 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
247 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
248 | GCC_WARN_UNDECLARED_SELECTOR = YES;
249 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
250 | GCC_WARN_UNUSED_FUNCTION = YES;
251 | GCC_WARN_UNUSED_VARIABLE = YES;
252 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
253 | MTL_ENABLE_DEBUG_INFO = NO;
254 | SDKROOT = iphoneos;
255 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
256 | TARGETED_DEVICE_FAMILY = "1,2";
257 | VALIDATE_PRODUCT = YES;
258 | VERSIONING_SYSTEM = "apple-generic";
259 | VERSION_INFO_PREFIX = "";
260 | };
261 | name = Release;
262 | };
263 | 9DC6CB061E9E14770080A14B /* Debug */ = {
264 | isa = XCBuildConfiguration;
265 | buildSettings = {
266 | CLANG_ENABLE_MODULES = YES;
267 | CODE_SIGN_IDENTITY = "";
268 | DEFINES_MODULE = YES;
269 | DEVELOPMENT_TEAM = SLC8XA65WS;
270 | DYLIB_COMPATIBILITY_VERSION = 1;
271 | DYLIB_CURRENT_VERSION = 1;
272 | DYLIB_INSTALL_NAME_BASE = "@rpath";
273 | INFOPLIST_FILE = "$(SRCROOT)/Source/Info.plist";
274 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
275 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
276 | PRODUCT_BUNDLE_IDENTIFIER = com.biatoms.LinearProgressView;
277 | PRODUCT_NAME = "$(TARGET_NAME)";
278 | SKIP_INSTALL = YES;
279 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
280 | SWIFT_SWIFT3_OBJC_INFERENCE = Off;
281 | SWIFT_VERSION = 4.0;
282 | };
283 | name = Debug;
284 | };
285 | 9DC6CB071E9E14770080A14B /* Release */ = {
286 | isa = XCBuildConfiguration;
287 | buildSettings = {
288 | CLANG_ENABLE_MODULES = YES;
289 | CODE_SIGN_IDENTITY = "";
290 | DEFINES_MODULE = YES;
291 | DEVELOPMENT_TEAM = SLC8XA65WS;
292 | DYLIB_COMPATIBILITY_VERSION = 1;
293 | DYLIB_CURRENT_VERSION = 1;
294 | DYLIB_INSTALL_NAME_BASE = "@rpath";
295 | INFOPLIST_FILE = "$(SRCROOT)/Source/Info.plist";
296 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
297 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
298 | PRODUCT_BUNDLE_IDENTIFIER = com.biatoms.LinearProgressView;
299 | PRODUCT_NAME = "$(TARGET_NAME)";
300 | SKIP_INSTALL = YES;
301 | SWIFT_SWIFT3_OBJC_INFERENCE = Off;
302 | SWIFT_VERSION = 4.0;
303 | };
304 | name = Release;
305 | };
306 | /* End XCBuildConfiguration section */
307 |
308 | /* Begin XCConfigurationList section */
309 | 9DC6CAF71E9E14770080A14B /* Build configuration list for PBXProject "LinearProgressView" */ = {
310 | isa = XCConfigurationList;
311 | buildConfigurations = (
312 | 9DC6CB031E9E14770080A14B /* Debug */,
313 | 9DC6CB041E9E14770080A14B /* Release */,
314 | );
315 | defaultConfigurationIsVisible = 0;
316 | defaultConfigurationName = Release;
317 | };
318 | 9DC6CB051E9E14770080A14B /* Build configuration list for PBXNativeTarget "LinearProgressView" */ = {
319 | isa = XCConfigurationList;
320 | buildConfigurations = (
321 | 9DC6CB061E9E14770080A14B /* Debug */,
322 | 9DC6CB071E9E14770080A14B /* Release */,
323 | );
324 | defaultConfigurationIsVisible = 0;
325 | defaultConfigurationName = Release;
326 | };
327 | /* End XCConfigurationList section */
328 | };
329 | rootObject = 9DC6CAF41E9E14770080A14B /* Project object */;
330 | }
331 |
--------------------------------------------------------------------------------
/LinearProgressViewExample/LinearProgressViewExample/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
69 |
75 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
--------------------------------------------------------------------------------
/LinearProgressViewExample/LinearProgressViewExample.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 9DC6CB171E9E16B50080A14B /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DC6CB161E9E16B50080A14B /* AppDelegate.swift */; };
11 | 9DC6CB191E9E16B50080A14B /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DC6CB181E9E16B50080A14B /* ViewController.swift */; };
12 | 9DC6CB1C1E9E16B50080A14B /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9DC6CB1A1E9E16B50080A14B /* Main.storyboard */; };
13 | 9DC6CB1E1E9E16B50080A14B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9DC6CB1D1E9E16B50080A14B /* Assets.xcassets */; };
14 | 9DC6CB211E9E16B50080A14B /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9DC6CB1F1E9E16B50080A14B /* LaunchScreen.storyboard */; };
15 | F2038CCD3EA9D9B8A05E78DA /* Pods_LinearProgressViewExample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3C1817E3A66C390997A92DB9 /* Pods_LinearProgressViewExample.framework */; };
16 | /* End PBXBuildFile section */
17 |
18 | /* Begin PBXFileReference section */
19 | 3C1817E3A66C390997A92DB9 /* Pods_LinearProgressViewExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_LinearProgressViewExample.framework; sourceTree = BUILT_PRODUCTS_DIR; };
20 | 8F5D8708709E65BC2FE435FA /* Pods-LinearProgressViewExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LinearProgressViewExample.release.xcconfig"; path = "Pods/Target Support Files/Pods-LinearProgressViewExample/Pods-LinearProgressViewExample.release.xcconfig"; sourceTree = ""; };
21 | 9DC6CB131E9E16B50080A14B /* LinearProgressViewExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LinearProgressViewExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
22 | 9DC6CB161E9E16B50080A14B /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
23 | 9DC6CB181E9E16B50080A14B /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
24 | 9DC6CB1B1E9E16B50080A14B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
25 | 9DC6CB1D1E9E16B50080A14B /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
26 | 9DC6CB201E9E16B50080A14B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
27 | 9DC6CB221E9E16B50080A14B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
28 | D58B94D02A68DA2A4B553379 /* Pods-LinearProgressViewExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LinearProgressViewExample.debug.xcconfig"; path = "Pods/Target Support Files/Pods-LinearProgressViewExample/Pods-LinearProgressViewExample.debug.xcconfig"; sourceTree = ""; };
29 | /* End PBXFileReference section */
30 |
31 | /* Begin PBXFrameworksBuildPhase section */
32 | 9DC6CB101E9E16B50080A14B /* Frameworks */ = {
33 | isa = PBXFrameworksBuildPhase;
34 | buildActionMask = 2147483647;
35 | files = (
36 | F2038CCD3EA9D9B8A05E78DA /* Pods_LinearProgressViewExample.framework in Frameworks */,
37 | );
38 | runOnlyForDeploymentPostprocessing = 0;
39 | };
40 | /* End PBXFrameworksBuildPhase section */
41 |
42 | /* Begin PBXGroup section */
43 | 9DC6CB0A1E9E16B50080A14B = {
44 | isa = PBXGroup;
45 | children = (
46 | 9DC6CB151E9E16B50080A14B /* LinearProgressViewExample */,
47 | 9DC6CB141E9E16B50080A14B /* Products */,
48 | A6148D91D2E709A0320F924D /* Pods */,
49 | DAE206766BBC5B85D439E67E /* Frameworks */,
50 | );
51 | sourceTree = "";
52 | };
53 | 9DC6CB141E9E16B50080A14B /* Products */ = {
54 | isa = PBXGroup;
55 | children = (
56 | 9DC6CB131E9E16B50080A14B /* LinearProgressViewExample.app */,
57 | );
58 | name = Products;
59 | sourceTree = "";
60 | };
61 | 9DC6CB151E9E16B50080A14B /* LinearProgressViewExample */ = {
62 | isa = PBXGroup;
63 | children = (
64 | 9DC6CB161E9E16B50080A14B /* AppDelegate.swift */,
65 | 9DC6CB181E9E16B50080A14B /* ViewController.swift */,
66 | 9DC6CB1A1E9E16B50080A14B /* Main.storyboard */,
67 | 9DC6CB1D1E9E16B50080A14B /* Assets.xcassets */,
68 | 9DC6CB1F1E9E16B50080A14B /* LaunchScreen.storyboard */,
69 | 9DC6CB221E9E16B50080A14B /* Info.plist */,
70 | );
71 | path = LinearProgressViewExample;
72 | sourceTree = "";
73 | };
74 | A6148D91D2E709A0320F924D /* Pods */ = {
75 | isa = PBXGroup;
76 | children = (
77 | D58B94D02A68DA2A4B553379 /* Pods-LinearProgressViewExample.debug.xcconfig */,
78 | 8F5D8708709E65BC2FE435FA /* Pods-LinearProgressViewExample.release.xcconfig */,
79 | );
80 | name = Pods;
81 | sourceTree = "";
82 | };
83 | DAE206766BBC5B85D439E67E /* Frameworks */ = {
84 | isa = PBXGroup;
85 | children = (
86 | 3C1817E3A66C390997A92DB9 /* Pods_LinearProgressViewExample.framework */,
87 | );
88 | name = Frameworks;
89 | sourceTree = "";
90 | };
91 | /* End PBXGroup section */
92 |
93 | /* Begin PBXNativeTarget section */
94 | 9DC6CB121E9E16B50080A14B /* LinearProgressViewExample */ = {
95 | isa = PBXNativeTarget;
96 | buildConfigurationList = 9DC6CB251E9E16B50080A14B /* Build configuration list for PBXNativeTarget "LinearProgressViewExample" */;
97 | buildPhases = (
98 | A7CB08701D6AF4161461D1E7 /* [CP] Check Pods Manifest.lock */,
99 | 9DC6CB0F1E9E16B50080A14B /* Sources */,
100 | 9DC6CB101E9E16B50080A14B /* Frameworks */,
101 | 9DC6CB111E9E16B50080A14B /* Resources */,
102 | 46DB8322077D7E9F876D5B98 /* [CP] Embed Pods Frameworks */,
103 | );
104 | buildRules = (
105 | );
106 | dependencies = (
107 | );
108 | name = LinearProgressViewExample;
109 | productName = LinearProgressViewExample;
110 | productReference = 9DC6CB131E9E16B50080A14B /* LinearProgressViewExample.app */;
111 | productType = "com.apple.product-type.application";
112 | };
113 | /* End PBXNativeTarget section */
114 |
115 | /* Begin PBXProject section */
116 | 9DC6CB0B1E9E16B50080A14B /* Project object */ = {
117 | isa = PBXProject;
118 | attributes = {
119 | LastSwiftUpdateCheck = 0810;
120 | LastUpgradeCheck = 0930;
121 | ORGANIZATIONNAME = BiAtoms;
122 | TargetAttributes = {
123 | 9DC6CB121E9E16B50080A14B = {
124 | CreatedOnToolsVersion = 8.1;
125 | LastSwiftMigration = 0900;
126 | ProvisioningStyle = Automatic;
127 | };
128 | };
129 | };
130 | buildConfigurationList = 9DC6CB0E1E9E16B50080A14B /* Build configuration list for PBXProject "LinearProgressViewExample" */;
131 | compatibilityVersion = "Xcode 3.2";
132 | developmentRegion = English;
133 | hasScannedForEncodings = 0;
134 | knownRegions = (
135 | en,
136 | Base,
137 | );
138 | mainGroup = 9DC6CB0A1E9E16B50080A14B;
139 | productRefGroup = 9DC6CB141E9E16B50080A14B /* Products */;
140 | projectDirPath = "";
141 | projectRoot = "";
142 | targets = (
143 | 9DC6CB121E9E16B50080A14B /* LinearProgressViewExample */,
144 | );
145 | };
146 | /* End PBXProject section */
147 |
148 | /* Begin PBXResourcesBuildPhase section */
149 | 9DC6CB111E9E16B50080A14B /* Resources */ = {
150 | isa = PBXResourcesBuildPhase;
151 | buildActionMask = 2147483647;
152 | files = (
153 | 9DC6CB211E9E16B50080A14B /* LaunchScreen.storyboard in Resources */,
154 | 9DC6CB1E1E9E16B50080A14B /* Assets.xcassets in Resources */,
155 | 9DC6CB1C1E9E16B50080A14B /* Main.storyboard in Resources */,
156 | );
157 | runOnlyForDeploymentPostprocessing = 0;
158 | };
159 | /* End PBXResourcesBuildPhase section */
160 |
161 | /* Begin PBXShellScriptBuildPhase section */
162 | 46DB8322077D7E9F876D5B98 /* [CP] Embed Pods Frameworks */ = {
163 | isa = PBXShellScriptBuildPhase;
164 | buildActionMask = 2147483647;
165 | files = (
166 | );
167 | inputPaths = (
168 | "${SRCROOT}/Pods/Target Support Files/Pods-LinearProgressViewExample/Pods-LinearProgressViewExample-frameworks.sh",
169 | "${BUILT_PRODUCTS_DIR}/LinearProgressView/LinearProgressView.framework",
170 | );
171 | name = "[CP] Embed Pods Frameworks";
172 | outputPaths = (
173 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/LinearProgressView.framework",
174 | );
175 | runOnlyForDeploymentPostprocessing = 0;
176 | shellPath = /bin/sh;
177 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-LinearProgressViewExample/Pods-LinearProgressViewExample-frameworks.sh\"\n";
178 | showEnvVarsInLog = 0;
179 | };
180 | A7CB08701D6AF4161461D1E7 /* [CP] Check Pods Manifest.lock */ = {
181 | isa = PBXShellScriptBuildPhase;
182 | buildActionMask = 2147483647;
183 | files = (
184 | );
185 | inputPaths = (
186 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
187 | "${PODS_ROOT}/Manifest.lock",
188 | );
189 | name = "[CP] Check Pods Manifest.lock";
190 | outputPaths = (
191 | "$(DERIVED_FILE_DIR)/Pods-LinearProgressViewExample-checkManifestLockResult.txt",
192 | );
193 | runOnlyForDeploymentPostprocessing = 0;
194 | shellPath = /bin/sh;
195 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
196 | showEnvVarsInLog = 0;
197 | };
198 | /* End PBXShellScriptBuildPhase section */
199 |
200 | /* Begin PBXSourcesBuildPhase section */
201 | 9DC6CB0F1E9E16B50080A14B /* Sources */ = {
202 | isa = PBXSourcesBuildPhase;
203 | buildActionMask = 2147483647;
204 | files = (
205 | 9DC6CB191E9E16B50080A14B /* ViewController.swift in Sources */,
206 | 9DC6CB171E9E16B50080A14B /* AppDelegate.swift in Sources */,
207 | );
208 | runOnlyForDeploymentPostprocessing = 0;
209 | };
210 | /* End PBXSourcesBuildPhase section */
211 |
212 | /* Begin PBXVariantGroup section */
213 | 9DC6CB1A1E9E16B50080A14B /* Main.storyboard */ = {
214 | isa = PBXVariantGroup;
215 | children = (
216 | 9DC6CB1B1E9E16B50080A14B /* Base */,
217 | );
218 | name = Main.storyboard;
219 | sourceTree = "";
220 | };
221 | 9DC6CB1F1E9E16B50080A14B /* LaunchScreen.storyboard */ = {
222 | isa = PBXVariantGroup;
223 | children = (
224 | 9DC6CB201E9E16B50080A14B /* Base */,
225 | );
226 | name = LaunchScreen.storyboard;
227 | sourceTree = "";
228 | };
229 | /* End PBXVariantGroup section */
230 |
231 | /* Begin XCBuildConfiguration section */
232 | 9DC6CB231E9E16B50080A14B /* Debug */ = {
233 | isa = XCBuildConfiguration;
234 | buildSettings = {
235 | ALWAYS_SEARCH_USER_PATHS = NO;
236 | CLANG_ANALYZER_NONNULL = YES;
237 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
238 | CLANG_CXX_LIBRARY = "libc++";
239 | CLANG_ENABLE_MODULES = YES;
240 | CLANG_ENABLE_OBJC_ARC = YES;
241 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
242 | CLANG_WARN_BOOL_CONVERSION = YES;
243 | CLANG_WARN_COMMA = YES;
244 | CLANG_WARN_CONSTANT_CONVERSION = YES;
245 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
246 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
247 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
248 | CLANG_WARN_EMPTY_BODY = YES;
249 | CLANG_WARN_ENUM_CONVERSION = YES;
250 | CLANG_WARN_INFINITE_RECURSION = YES;
251 | CLANG_WARN_INT_CONVERSION = YES;
252 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
253 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
254 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
255 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
256 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
257 | CLANG_WARN_STRICT_PROTOTYPES = YES;
258 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
259 | CLANG_WARN_SUSPICIOUS_MOVES = YES;
260 | CLANG_WARN_UNREACHABLE_CODE = YES;
261 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
262 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
263 | COPY_PHASE_STRIP = NO;
264 | DEBUG_INFORMATION_FORMAT = dwarf;
265 | ENABLE_STRICT_OBJC_MSGSEND = YES;
266 | ENABLE_TESTABILITY = YES;
267 | GCC_C_LANGUAGE_STANDARD = gnu99;
268 | GCC_DYNAMIC_NO_PIC = NO;
269 | GCC_NO_COMMON_BLOCKS = YES;
270 | GCC_OPTIMIZATION_LEVEL = 0;
271 | GCC_PREPROCESSOR_DEFINITIONS = (
272 | "DEBUG=1",
273 | "$(inherited)",
274 | );
275 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
276 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
277 | GCC_WARN_UNDECLARED_SELECTOR = YES;
278 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
279 | GCC_WARN_UNUSED_FUNCTION = YES;
280 | GCC_WARN_UNUSED_VARIABLE = YES;
281 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
282 | MTL_ENABLE_DEBUG_INFO = YES;
283 | ONLY_ACTIVE_ARCH = YES;
284 | SDKROOT = iphoneos;
285 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
286 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
287 | TARGETED_DEVICE_FAMILY = "1,2";
288 | };
289 | name = Debug;
290 | };
291 | 9DC6CB241E9E16B50080A14B /* Release */ = {
292 | isa = XCBuildConfiguration;
293 | buildSettings = {
294 | ALWAYS_SEARCH_USER_PATHS = NO;
295 | CLANG_ANALYZER_NONNULL = YES;
296 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
297 | CLANG_CXX_LIBRARY = "libc++";
298 | CLANG_ENABLE_MODULES = YES;
299 | CLANG_ENABLE_OBJC_ARC = YES;
300 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
301 | CLANG_WARN_BOOL_CONVERSION = YES;
302 | CLANG_WARN_COMMA = YES;
303 | CLANG_WARN_CONSTANT_CONVERSION = YES;
304 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
305 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
306 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
307 | CLANG_WARN_EMPTY_BODY = YES;
308 | CLANG_WARN_ENUM_CONVERSION = YES;
309 | CLANG_WARN_INFINITE_RECURSION = YES;
310 | CLANG_WARN_INT_CONVERSION = YES;
311 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
312 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
313 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
314 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
315 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
316 | CLANG_WARN_STRICT_PROTOTYPES = YES;
317 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
318 | CLANG_WARN_SUSPICIOUS_MOVES = YES;
319 | CLANG_WARN_UNREACHABLE_CODE = YES;
320 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
321 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
322 | COPY_PHASE_STRIP = NO;
323 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
324 | ENABLE_NS_ASSERTIONS = NO;
325 | ENABLE_STRICT_OBJC_MSGSEND = YES;
326 | GCC_C_LANGUAGE_STANDARD = gnu99;
327 | GCC_NO_COMMON_BLOCKS = YES;
328 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
329 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
330 | GCC_WARN_UNDECLARED_SELECTOR = YES;
331 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
332 | GCC_WARN_UNUSED_FUNCTION = YES;
333 | GCC_WARN_UNUSED_VARIABLE = YES;
334 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
335 | MTL_ENABLE_DEBUG_INFO = NO;
336 | SDKROOT = iphoneos;
337 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
338 | TARGETED_DEVICE_FAMILY = "1,2";
339 | VALIDATE_PRODUCT = YES;
340 | };
341 | name = Release;
342 | };
343 | 9DC6CB261E9E16B50080A14B /* Debug */ = {
344 | isa = XCBuildConfiguration;
345 | baseConfigurationReference = D58B94D02A68DA2A4B553379 /* Pods-LinearProgressViewExample.debug.xcconfig */;
346 | buildSettings = {
347 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
348 | INFOPLIST_FILE = LinearProgressViewExample/Info.plist;
349 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
350 | PRODUCT_BUNDLE_IDENTIFIER = com.biatoms.LinearProgressViewExample;
351 | PRODUCT_NAME = "$(TARGET_NAME)";
352 | SWIFT_SWIFT3_OBJC_INFERENCE = Off;
353 | SWIFT_VERSION = 4.0;
354 | };
355 | name = Debug;
356 | };
357 | 9DC6CB271E9E16B50080A14B /* Release */ = {
358 | isa = XCBuildConfiguration;
359 | baseConfigurationReference = 8F5D8708709E65BC2FE435FA /* Pods-LinearProgressViewExample.release.xcconfig */;
360 | buildSettings = {
361 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
362 | INFOPLIST_FILE = LinearProgressViewExample/Info.plist;
363 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
364 | PRODUCT_BUNDLE_IDENTIFIER = com.biatoms.LinearProgressViewExample;
365 | PRODUCT_NAME = "$(TARGET_NAME)";
366 | SWIFT_SWIFT3_OBJC_INFERENCE = Off;
367 | SWIFT_VERSION = 4.0;
368 | };
369 | name = Release;
370 | };
371 | /* End XCBuildConfiguration section */
372 |
373 | /* Begin XCConfigurationList section */
374 | 9DC6CB0E1E9E16B50080A14B /* Build configuration list for PBXProject "LinearProgressViewExample" */ = {
375 | isa = XCConfigurationList;
376 | buildConfigurations = (
377 | 9DC6CB231E9E16B50080A14B /* Debug */,
378 | 9DC6CB241E9E16B50080A14B /* Release */,
379 | );
380 | defaultConfigurationIsVisible = 0;
381 | defaultConfigurationName = Release;
382 | };
383 | 9DC6CB251E9E16B50080A14B /* Build configuration list for PBXNativeTarget "LinearProgressViewExample" */ = {
384 | isa = XCConfigurationList;
385 | buildConfigurations = (
386 | 9DC6CB261E9E16B50080A14B /* Debug */,
387 | 9DC6CB271E9E16B50080A14B /* Release */,
388 | );
389 | defaultConfigurationIsVisible = 0;
390 | defaultConfigurationName = Release;
391 | };
392 | /* End XCConfigurationList section */
393 | };
394 | rootObject = 9DC6CB0B1E9E16B50080A14B /* Project object */;
395 | }
396 |
--------------------------------------------------------------------------------