├── Demo └── DemoApp │ ├── DemoApp │ ├── Assets.xcassets │ │ ├── Contents.json │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── ViewController.swift │ ├── Info.plist │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ └── AppDelegate.swift │ └── DemoApp.xcodeproj │ ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── project.pbxproj ├── LICENSE ├── .gitignore ├── README.md ├── SSProgressBar.podspec └── SSProgressBar └── SSProgressBar.swift /Demo/DemoApp/DemoApp/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Demo/DemoApp/DemoApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Demo/DemoApp/DemoApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Simform 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 | -------------------------------------------------------------------------------- /Demo/DemoApp/DemoApp/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // ULProgressBar 4 | // 5 | // Created by Umang Loriya on 7/23/18. 6 | // Copyright © 2018 Umang Loriya. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ViewController: UIViewController { 12 | @IBOutlet var viewProgres: ULProgressBar! 13 | 14 | @IBOutlet var prgView: UIProgressView! 15 | override func viewDidLoad() { 16 | super.viewDidLoad() 17 | viewProgres.progress = 50 18 | viewProgres.withProgressGradientBackground(from: UIColor.red, to: UIColor.purple, direction: .topToBottom) 19 | DispatchQueue.main.asyncAfter(deadline: .now() + 2) { 20 | self.viewProgres.progress = 120 21 | self.viewProgres.gradientDirection = .leftToRight 22 | self.viewProgres.colors = [UIColor.blue.cgColor,UIColor.cyan.cgColor,UIColor.black.cgColor] 23 | } 24 | DispatchQueue.main.asyncAfter(deadline: .now() + 3) { 25 | self.viewProgres.withProgressGradientBackground(from: UIColor.green, to: UIColor.green.withAlphaComponent(0.5), direction: .bottomToTop) 26 | } 27 | 28 | } 29 | 30 | override func didReceiveMemoryWarning() { 31 | super.didReceiveMemoryWarning() 32 | // Dispose of any resources that can be recreated. 33 | } 34 | 35 | 36 | } 37 | 38 | -------------------------------------------------------------------------------- /Demo/DemoApp/DemoApp/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 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 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xccheckout 23 | *.xcscmblueprint 24 | 25 | ## Obj-C/Swift specific 26 | *.hmap 27 | *.ipa 28 | *.dSYM.zip 29 | *.dSYM 30 | 31 | ## Playgrounds 32 | timeline.xctimeline 33 | playground.xcworkspace 34 | 35 | # Swift Package Manager 36 | # 37 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 38 | # Packages/ 39 | # Package.pins 40 | # Package.resolved 41 | .build/ 42 | 43 | # CocoaPods 44 | # 45 | # We recommend against adding the Pods directory to your .gitignore. However 46 | # you should judge for yourself, the pros and cons are mentioned at: 47 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 48 | # 49 | # Pods/ 50 | 51 | # Carthage 52 | # 53 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 54 | # Carthage/Checkouts 55 | 56 | Carthage/Build 57 | 58 | # fastlane 59 | # 60 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 61 | # screenshots whenever they are needed. 62 | # For more information about the recommended setup visit: 63 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 64 | 65 | fastlane/report.xml 66 | fastlane/Preview.html 67 | fastlane/screenshots/**/*.png 68 | fastlane/test_output 69 | -------------------------------------------------------------------------------- /Demo/DemoApp/DemoApp/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 | -------------------------------------------------------------------------------- /Demo/DemoApp/DemoApp/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 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /Demo/DemoApp/DemoApp/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // DemoApp 4 | // 5 | // Created by Umang Loriya on 10/17/18. 6 | // Copyright © 2018 Umang Loriya. 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: [UIApplication.LaunchOptionsKey: 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 | # SSProgressBar 2 | 3 | 4 | SSProgressBar is an elegant progressbar with many customization options. 5 | 6 | [![Swift Version][swift-image]][swift-url] 7 | [![Build Status][travis-image]][travis-url] 8 | [![License][license-image]][license-url] 9 | [![Platform][platform-image]][platform-url] 10 | [![PRs Welcome][PR-image]][PR-url] 11 | 12 | 13 | # Features! 14 | - Horizontal Gradient 15 | - Vertical Gradient 16 | - Custom shadow 17 | - Corner radious 18 | - CocoaPods 19 | 20 | # Requirements 21 | - iOS 10.0+ 22 | - Xcode 9+ 23 | 24 | # Installation 25 | **CocoaPods** 26 | 27 | - You can use CocoaPods to install SSSpinnerButton by adding it to your Podfile: 28 | 29 | use_frameworks! 30 | pod 'SSProgressBar' 31 | 32 | - 33 | import UIKit 34 | import SSProgressBar 35 | 36 | **Manually** 37 | - Download and drop **SSProgressBar** folder in your project. 38 | - Congratulations! 39 | 40 | # Usage example 41 | 42 | - In the storyboard add a UIView and change its class to SSProgressBar 43 | 44 | **Set up gradient** 45 | 46 | viewProgres.withProgressGradientBackground(from: UIColor.red, to: UIColor.purple, direction: .topToBottom) 47 | 48 | **Edit properties at anytime** 49 | 50 | self.viewProgres.progress = 120 51 | self.viewProgres.gradientDirection = .leftToRight 52 | self.viewProgres.colors = [UIColor.blue.cgColor,UIColor.cyan.cgColor,UIColor.black.cgColor] 53 | 54 | 55 | # Contribute 56 | - We would love you for the contribution to SSProgressBar, check the LICENSE file for more info. 57 | 58 | # Meta 59 | - Distributed under the MIT license. See LICENSE for more information. 60 | 61 | 62 | [swift-image]:https://img.shields.io/badge/swift-4.0-orange.svg 63 | [swift-url]: https://swift.org/ 64 | [license-image]: https://img.shields.io/badge/License-MIT-blue.svg 65 | [license-url]: LICENSE 66 | [travis-image]: https://img.shields.io/travis/dbader/node-datadog-metrics/master.svg?style=flat-square 67 | [travis-url]: https://travis-ci.org/dbader/node-datadog-metrics 68 | [codebeat-image]: https://codebeat.co/assets/svg/badges/C-ffb83f-7198e9a1b7ad7f73977b0c9a5c7c3fffbfa25f262510e5681fd8f5a3188216b0.svg 69 | [codebeat-url]: https://codebeat.co/projects/github-com-vsouza-awesomeios-com 70 | [platform-image]:https://img.shields.io/cocoapods/p/LFAlertController.svg?style=flat 71 | [platform-url]:http://cocoapods.org/pods/LFAlertController 72 | [cocoa-image]:https://img.shields.io/cocoapods/v/EZSwiftExtensions.svg 73 | [cocoa-url]:https://img.shields.io/cocoapods/v/LFAlertController.svg 74 | [PR-image]:https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square 75 | [PR-url]:http://makeapullrequest.com 76 | 77 | -------------------------------------------------------------------------------- /SSProgressBar.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod spec lint SSProgressBar.podspec' to ensure this is a 3 | # valid spec and to remove all comments including this before submitting the spec. 4 | # 5 | # To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html 6 | # To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/ 7 | # 8 | 9 | Pod::Spec.new do |s| 10 | 11 | # ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 12 | # 13 | # These will help people to find your library, and whilst it 14 | # can feel like a chore to fill in it's definitely to your advantage. The 15 | # summary should be tweet-length, and the description more in depth. 16 | # 17 | 18 | s.name = "SSProgressBar" 19 | s.version = "1.0.1" 20 | s.summary = "SSProgressBar: highly customizable progressbar " 21 | 22 | s.description = <<-DESC 23 | 24 | SSProgressBar provides many customization options like the horizontal and vertical gradient, custom shadow, corner radius and many more. 25 | DESC 26 | 27 | s.homepage = "https://github.com/simformsolutions/SSProgressBar" 28 | 29 | 30 | # ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 31 | # 32 | # Licensing your code is important. See http://choosealicense.com for more info. 33 | # CocoaPods will detect a license file if there is a named LICENSE* 34 | # Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'. 35 | # 36 | 37 | s.license = { :type => "MIT", :file => "LICENSE" } 38 | # s.license = { :type => "MIT", :file => "FILE_LICENSE" } 39 | 40 | 41 | # ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 42 | # 43 | # Specify the authors of the library, with email addresses. Email addresses 44 | # of the authors are extracted from the SCM log. E.g. $ git log. CocoaPods also 45 | # accepts just a name if you'd rather not provide an email address. 46 | # 47 | # Specify a social_media_url where others can refer to, for example a twitter 48 | # profile URL. 49 | # 50 | 51 | s.author = { "Umang Loriya" => "umang.l@simformsolutions.com" } 52 | # Or just: s.author = "Umang Loriya" 53 | # s.authors = { "Umang Loriya" => "umang.l@simformsolutions.com" } 54 | 55 | # ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 56 | # 57 | # If this Pod runs only on iOS or OS X, then specify the platform and 58 | # the deployment target. You can optionally include the target after the platform. 59 | # 60 | 61 | # s.platform = :ios 62 | s.platform = :ios, "10.0" 63 | 64 | # When using multiple platforms 65 | # s.ios.deployment_target = "10.0" 66 | # s.osx.deployment_target = "10.7" 67 | # s.watchos.deployment_target = "2.0" 68 | # s.tvos.deployment_target = "9.0" 69 | 70 | 71 | # ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 72 | # 73 | # Specify the location from where the source should be retrieved. 74 | # Supports git, hg, bzr, svn and HTTP. 75 | # 76 | 77 | s.source = { :git => "https://github.com/simformsolutions/SSProgressBar.git", :tag => "#{s.version}" } 78 | 79 | 80 | # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 81 | # 82 | # CocoaPods is smart about how it includes source code. For source files 83 | # giving a folder will include any swift, h, m, mm, c & cpp files. 84 | # For header files it will include any header in the folder. 85 | # Not including the public_header_files will make all headers public. 86 | # 87 | 88 | # s.source_files = "Classes", "Classes/**/*.{h,m}" 89 | s.source_files = "SSProgressBar/*.swift" 90 | 91 | # s.public_header_files = "Classes/**/*.h" 92 | 93 | 94 | # ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 95 | # 96 | # A list of resources included with the Pod. These are copied into the 97 | # target bundle with a build phase script. Anything else will be cleaned. 98 | # You can preserve files from being cleaned, please don't preserve 99 | # non-essential files like tests, examples and documentation. 100 | # 101 | # s.resources = "SSProgressBar/*.storyboard", "SSProgressBar/*.xcassets" 102 | s.requires_arc = true 103 | 104 | # s.resource = "icon.png" 105 | # s.resources = "Resources/*.png" 106 | 107 | # s.preserve_paths = "FilesToSave", "MoreFilesToSave" 108 | 109 | 110 | # ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 111 | # 112 | # Link your library with frameworks, or libraries. Libraries do not include 113 | # the lib prefix of their name. 114 | # 115 | s.swift_version = '4.0' 116 | 117 | # s.framework = "SomeFramework" 118 | # s.frameworks = "SomeFramework", "AnotherFramework" 119 | 120 | # s.library = "iconv" 121 | # s.libraries = "iconv", "xml2" 122 | 123 | 124 | # ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 125 | # 126 | # If your library depends on compiler flags you can set them in the xcconfig hash 127 | # where they will only apply to your library. If you depend on other Podspecs 128 | # you can include multiple dependencies to ensure it works. 129 | 130 | # s.requires_arc = true 131 | 132 | # s.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" } 133 | # s.dependency "JSONKit", "~> 1.4" 134 | 135 | end 136 | -------------------------------------------------------------------------------- /Demo/DemoApp/DemoApp/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 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /SSProgressBar/SSProgressBar.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ULProgressBar.swift 3 | // ULProgressBar 4 | // 5 | // Created by Umang Loriya on 7/23/18. 6 | // Copyright © 2018 Umang Loriya. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @IBDesignable 12 | open class SSProgressBar: UIView { 13 | 14 | public enum GradientDirection { 15 | case leftToRight 16 | case rightToLeft 17 | case topToBottom 18 | case bottomToTop 19 | } 20 | public enum Parameters { 21 | case shadowColor 22 | case cornerRadius 23 | case shadowOffset 24 | case shadowOpacity 25 | case borderColor 26 | case borderWidth 27 | case trackBGColor 28 | case progressWidth 29 | case gradientColor 30 | case gradientDirection 31 | } 32 | 33 | private var progressView = UIView() 34 | public var gradientDirection: GradientDirection = .topToBottom { 35 | didSet { 36 | self.updateView(params: .gradientDirection) 37 | } 38 | } 39 | 40 | public var colors: [CGColor] = [] { 41 | didSet { 42 | if colors.count > 0 { 43 | self.updateView(params: .gradientColor) 44 | } 45 | } 46 | } 47 | 48 | @IBInspectable public var progress: Int = 10 { 49 | didSet { 50 | print(progress) 51 | progressWidth = Int(self.frame.width * CGFloat(min(progress, 100)) / 100) 52 | } 53 | } 54 | 55 | private var progressWidth: Int { 56 | get { 57 | return Int(self.frame.width * CGFloat(min(progress, 100)) / 100) 58 | } 59 | set { 60 | self.progressView.frame = CGRect(x: 0, y: 0, width: newValue, height: Int(self.frame.height)) 61 | self.updateView(params: .progressWidth) 62 | } 63 | } 64 | 65 | @IBInspectable public var trackBackgroundColor: UIColor = UIColor.white { 66 | didSet { 67 | self.updateView(params: .cornerRadius) 68 | } 69 | } 70 | 71 | @IBInspectable public var cornerRadius: CGFloat = 0.0 { 72 | didSet { 73 | self.updateView(params: .cornerRadius) 74 | } 75 | } 76 | 77 | @IBInspectable public var borderWidth: CGFloat = 0 { 78 | didSet { 79 | self.updateView(params: .borderWidth) 80 | } 81 | } 82 | 83 | @IBInspectable public var borderColor: UIColor? = UIColor.clear { 84 | didSet { 85 | self.updateView(params: .borderColor) 86 | } 87 | } 88 | 89 | @IBInspectable public var shadowColor: UIColor? = UIColor.clear { 90 | didSet { 91 | self.updateView(params: .shadowColor) 92 | } 93 | } 94 | 95 | @IBInspectable public var shadowOffset: CGSize = CGSize(width: 0, height: 0) { 96 | didSet { 97 | self.updateView(params: .shadowOffset) 98 | } 99 | } 100 | 101 | @IBInspectable public var shadowOpacity: Double = 0 { 102 | didSet { 103 | self.updateView(params: .shadowOpacity) 104 | } 105 | } 106 | 107 | private func updateView(params: Parameters) { 108 | if self.progressView.layer.sublayers != nil { 109 | if self.progressView.layer.sublayers![0].isKind(of: CAGradientLayer.self) { 110 | let layer = self.progressView.layer.sublayers![0] as? CAGradientLayer 111 | 112 | switch params { 113 | case .shadowColor: 114 | layer?.shadowColor = self.shadowColor?.cgColor 115 | case .cornerRadius: 116 | layer?.cornerRadius = self.cornerRadius 117 | case .shadowOffset: 118 | layer?.shadowOffset = self.shadowOffset 119 | case .shadowOpacity: 120 | layer?.shadowOpacity = Float(self.shadowOpacity) 121 | case .borderColor: 122 | self.layer.borderColor = self.borderColor?.cgColor 123 | // layer?.borderColor = self.borderColor?.cgColor 124 | case .borderWidth: 125 | self.layer.borderWidth = self.borderWidth 126 | // layer?.borderWidth = self.borderWidth 127 | case .trackBGColor: 128 | self.backgroundColor = self.trackBackgroundColor 129 | case .progressWidth: 130 | UIView.animate(withDuration: 0.3, delay: 0.0, options: .curveEaseIn, animations: { 131 | layer?.frame.size.width = CGFloat(self.progressWidth) 132 | }) { (isDone) in 133 | 134 | } 135 | case .gradientColor: 136 | layer?.colors = self.colors 137 | case .gradientDirection: 138 | self.changeGradientDirection(dir: self.gradientDirection, layer: layer) 139 | } 140 | } 141 | } 142 | } 143 | 144 | private func changeGradientDirection(dir: GradientDirection, layer: CAGradientLayer?) { 145 | switch dir { 146 | case .leftToRight: 147 | layer?.startPoint = CGPoint(x: 0.0, y: 0.5) 148 | layer?.endPoint = CGPoint(x: 1.0, y: 0.5) 149 | case .rightToLeft: 150 | layer?.startPoint = CGPoint(x: 1.0, y: 0.5) 151 | layer?.endPoint = CGPoint(x: 0.0, y: 0.5) 152 | case .bottomToTop: 153 | layer?.startPoint = CGPoint(x: 0.5, y: 1.0) 154 | layer?.endPoint = CGPoint(x: 0.5, y: 0.0) 155 | default: 156 | break 157 | } 158 | } 159 | 160 | public func withProgressGradientBackground(from color1: UIColor, to color2: UIColor, direction: GradientDirection) { 161 | if self.progressView.layer.sublayers != nil { 162 | if self.progressView.layer.sublayers![0].isKind(of: CAGradientLayer.self) { 163 | let layer = self.progressView.layer.sublayers![0] as? CAGradientLayer 164 | layer?.colors = [color1.cgColor, color2.cgColor] 165 | self.changeGradientDirection(dir: direction, layer: layer) 166 | return 167 | } 168 | } 169 | self.addSubview(progressView) 170 | self.layoutIfNeeded() 171 | self.applyConstraints() 172 | let gradient = CAGradientLayer() 173 | self.progressView.frame = CGRect(x: 0, y: 0, width: progressWidth, height: Int(self.frame.height)) 174 | gradient.frame = self.progressView.bounds 175 | gradient.colors = [color1.cgColor, color2.cgColor] 176 | gradient.cornerRadius = self.cornerRadius 177 | gradient.shadowColor = self.shadowColor?.cgColor 178 | gradient.shadowOffset = self.shadowOffset 179 | gradient.shadowOpacity = Float(self.shadowOpacity) 180 | self.applySelfProperties() 181 | self.changeGradientDirection(dir: direction, layer: gradient) 182 | self.progressView.layer.insertSublayer(gradient, at: 0) 183 | print(progressView.frame) 184 | print(self.frame) 185 | 186 | 187 | } 188 | 189 | private func applySelfProperties() { 190 | self.layer.borderColor = self.borderColor?.cgColor 191 | self.layer.borderWidth = self.borderWidth 192 | self.layer.cornerRadius = self.cornerRadius 193 | self.backgroundColor = self.trackBackgroundColor 194 | } 195 | 196 | override open func layoutSubviews() { 197 | super.layoutSubviews() 198 | 199 | } 200 | 201 | private func applyConstraints() { 202 | self.progressView.translatesAutoresizingMaskIntoConstraints = false 203 | NSLayoutConstraint.activate([ 204 | self.progressView.leadingAnchor.constraint(equalTo: self.leadingAnchor, constant: 0), 205 | self.progressView.trailingAnchor.constraint(equalTo: self.trailingAnchor, constant: self.frame.width - CGFloat(self.progressWidth)), 206 | self.progressView.heightAnchor.constraint(equalTo: self.heightAnchor, constant: 0), 207 | self.progressView.centerYAnchor.constraint(equalTo: self.centerYAnchor, constant: 0) 208 | ]) 209 | } 210 | 211 | } 212 | -------------------------------------------------------------------------------- /Demo/DemoApp/DemoApp.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 8F4DCAF32177257E00ED5606 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F4DCAF22177257E00ED5606 /* AppDelegate.swift */; }; 11 | 8F4DCAF52177257E00ED5606 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F4DCAF42177257E00ED5606 /* ViewController.swift */; }; 12 | 8F4DCAF82177257E00ED5606 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8F4DCAF62177257E00ED5606 /* Main.storyboard */; }; 13 | 8F4DCAFA2177257F00ED5606 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8F4DCAF92177257F00ED5606 /* Assets.xcassets */; }; 14 | 8F4DCAFD2177257F00ED5606 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8F4DCAFB2177257F00ED5606 /* LaunchScreen.storyboard */; }; 15 | 8F4DCB0621772FAB00ED5606 /* ULProgressBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F4DCB0521772FAB00ED5606 /* ULProgressBar.swift */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXFileReference section */ 19 | 8F4DCAEF2177257E00ED5606 /* DemoApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DemoApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; 20 | 8F4DCAF22177257E00ED5606 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 21 | 8F4DCAF42177257E00ED5606 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 22 | 8F4DCAF72177257E00ED5606 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 23 | 8F4DCAF92177257F00ED5606 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 24 | 8F4DCAFC2177257F00ED5606 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 25 | 8F4DCAFE2177257F00ED5606 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 26 | 8F4DCB0521772FAB00ED5606 /* ULProgressBar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ULProgressBar.swift; path = ../../../SSProgressBar/ULProgressBar.swift; sourceTree = ""; }; 27 | /* End PBXFileReference section */ 28 | 29 | /* Begin PBXFrameworksBuildPhase section */ 30 | 8F4DCAEC2177257E00ED5606 /* Frameworks */ = { 31 | isa = PBXFrameworksBuildPhase; 32 | buildActionMask = 2147483647; 33 | files = ( 34 | ); 35 | runOnlyForDeploymentPostprocessing = 0; 36 | }; 37 | /* End PBXFrameworksBuildPhase section */ 38 | 39 | /* Begin PBXGroup section */ 40 | 8F4DCAE62177257E00ED5606 = { 41 | isa = PBXGroup; 42 | children = ( 43 | 8F4DCAF12177257E00ED5606 /* DemoApp */, 44 | 8F4DCAF02177257E00ED5606 /* Products */, 45 | ); 46 | sourceTree = ""; 47 | }; 48 | 8F4DCAF02177257E00ED5606 /* Products */ = { 49 | isa = PBXGroup; 50 | children = ( 51 | 8F4DCAEF2177257E00ED5606 /* DemoApp.app */, 52 | ); 53 | name = Products; 54 | sourceTree = ""; 55 | }; 56 | 8F4DCAF12177257E00ED5606 /* DemoApp */ = { 57 | isa = PBXGroup; 58 | children = ( 59 | 8F4DCB0421772F9000ED5606 /* SSProgressBar */, 60 | 8F4DCAF22177257E00ED5606 /* AppDelegate.swift */, 61 | 8F4DCAF42177257E00ED5606 /* ViewController.swift */, 62 | 8F4DCAF62177257E00ED5606 /* Main.storyboard */, 63 | 8F4DCAF92177257F00ED5606 /* Assets.xcassets */, 64 | 8F4DCAFB2177257F00ED5606 /* LaunchScreen.storyboard */, 65 | 8F4DCAFE2177257F00ED5606 /* Info.plist */, 66 | ); 67 | path = DemoApp; 68 | sourceTree = ""; 69 | }; 70 | 8F4DCB0421772F9000ED5606 /* SSProgressBar */ = { 71 | isa = PBXGroup; 72 | children = ( 73 | 8F4DCB0521772FAB00ED5606 /* ULProgressBar.swift */, 74 | ); 75 | name = SSProgressBar; 76 | sourceTree = ""; 77 | }; 78 | /* End PBXGroup section */ 79 | 80 | /* Begin PBXNativeTarget section */ 81 | 8F4DCAEE2177257E00ED5606 /* DemoApp */ = { 82 | isa = PBXNativeTarget; 83 | buildConfigurationList = 8F4DCB012177257F00ED5606 /* Build configuration list for PBXNativeTarget "DemoApp" */; 84 | buildPhases = ( 85 | 8F4DCAEB2177257E00ED5606 /* Sources */, 86 | 8F4DCAEC2177257E00ED5606 /* Frameworks */, 87 | 8F4DCAED2177257E00ED5606 /* Resources */, 88 | ); 89 | buildRules = ( 90 | ); 91 | dependencies = ( 92 | ); 93 | name = DemoApp; 94 | productName = DemoApp; 95 | productReference = 8F4DCAEF2177257E00ED5606 /* DemoApp.app */; 96 | productType = "com.apple.product-type.application"; 97 | }; 98 | /* End PBXNativeTarget section */ 99 | 100 | /* Begin PBXProject section */ 101 | 8F4DCAE72177257E00ED5606 /* Project object */ = { 102 | isa = PBXProject; 103 | attributes = { 104 | LastSwiftUpdateCheck = 1000; 105 | LastUpgradeCheck = 1000; 106 | ORGANIZATIONNAME = "Umang Loriya"; 107 | TargetAttributes = { 108 | 8F4DCAEE2177257E00ED5606 = { 109 | CreatedOnToolsVersion = 10.0; 110 | }; 111 | }; 112 | }; 113 | buildConfigurationList = 8F4DCAEA2177257E00ED5606 /* Build configuration list for PBXProject "DemoApp" */; 114 | compatibilityVersion = "Xcode 9.3"; 115 | developmentRegion = en; 116 | hasScannedForEncodings = 0; 117 | knownRegions = ( 118 | en, 119 | Base, 120 | ); 121 | mainGroup = 8F4DCAE62177257E00ED5606; 122 | productRefGroup = 8F4DCAF02177257E00ED5606 /* Products */; 123 | projectDirPath = ""; 124 | projectRoot = ""; 125 | targets = ( 126 | 8F4DCAEE2177257E00ED5606 /* DemoApp */, 127 | ); 128 | }; 129 | /* End PBXProject section */ 130 | 131 | /* Begin PBXResourcesBuildPhase section */ 132 | 8F4DCAED2177257E00ED5606 /* Resources */ = { 133 | isa = PBXResourcesBuildPhase; 134 | buildActionMask = 2147483647; 135 | files = ( 136 | 8F4DCAFD2177257F00ED5606 /* LaunchScreen.storyboard in Resources */, 137 | 8F4DCAFA2177257F00ED5606 /* Assets.xcassets in Resources */, 138 | 8F4DCAF82177257E00ED5606 /* Main.storyboard in Resources */, 139 | ); 140 | runOnlyForDeploymentPostprocessing = 0; 141 | }; 142 | /* End PBXResourcesBuildPhase section */ 143 | 144 | /* Begin PBXSourcesBuildPhase section */ 145 | 8F4DCAEB2177257E00ED5606 /* Sources */ = { 146 | isa = PBXSourcesBuildPhase; 147 | buildActionMask = 2147483647; 148 | files = ( 149 | 8F4DCAF52177257E00ED5606 /* ViewController.swift in Sources */, 150 | 8F4DCB0621772FAB00ED5606 /* ULProgressBar.swift in Sources */, 151 | 8F4DCAF32177257E00ED5606 /* AppDelegate.swift in Sources */, 152 | ); 153 | runOnlyForDeploymentPostprocessing = 0; 154 | }; 155 | /* End PBXSourcesBuildPhase section */ 156 | 157 | /* Begin PBXVariantGroup section */ 158 | 8F4DCAF62177257E00ED5606 /* Main.storyboard */ = { 159 | isa = PBXVariantGroup; 160 | children = ( 161 | 8F4DCAF72177257E00ED5606 /* Base */, 162 | ); 163 | name = Main.storyboard; 164 | sourceTree = ""; 165 | }; 166 | 8F4DCAFB2177257F00ED5606 /* LaunchScreen.storyboard */ = { 167 | isa = PBXVariantGroup; 168 | children = ( 169 | 8F4DCAFC2177257F00ED5606 /* Base */, 170 | ); 171 | name = LaunchScreen.storyboard; 172 | sourceTree = ""; 173 | }; 174 | /* End PBXVariantGroup section */ 175 | 176 | /* Begin XCBuildConfiguration section */ 177 | 8F4DCAFF2177257F00ED5606 /* Debug */ = { 178 | isa = XCBuildConfiguration; 179 | buildSettings = { 180 | ALWAYS_SEARCH_USER_PATHS = NO; 181 | CLANG_ANALYZER_NONNULL = YES; 182 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 183 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 184 | CLANG_CXX_LIBRARY = "libc++"; 185 | CLANG_ENABLE_MODULES = YES; 186 | CLANG_ENABLE_OBJC_ARC = YES; 187 | CLANG_ENABLE_OBJC_WEAK = YES; 188 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 189 | CLANG_WARN_BOOL_CONVERSION = YES; 190 | CLANG_WARN_COMMA = YES; 191 | CLANG_WARN_CONSTANT_CONVERSION = YES; 192 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 193 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 194 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 195 | CLANG_WARN_EMPTY_BODY = YES; 196 | CLANG_WARN_ENUM_CONVERSION = YES; 197 | CLANG_WARN_INFINITE_RECURSION = YES; 198 | CLANG_WARN_INT_CONVERSION = YES; 199 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 200 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 201 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 202 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 203 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 204 | CLANG_WARN_STRICT_PROTOTYPES = YES; 205 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 206 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 207 | CLANG_WARN_UNREACHABLE_CODE = YES; 208 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 209 | CODE_SIGN_IDENTITY = "iPhone Developer"; 210 | COPY_PHASE_STRIP = NO; 211 | DEBUG_INFORMATION_FORMAT = dwarf; 212 | ENABLE_STRICT_OBJC_MSGSEND = YES; 213 | ENABLE_TESTABILITY = YES; 214 | GCC_C_LANGUAGE_STANDARD = gnu11; 215 | GCC_DYNAMIC_NO_PIC = NO; 216 | GCC_NO_COMMON_BLOCKS = YES; 217 | GCC_OPTIMIZATION_LEVEL = 0; 218 | GCC_PREPROCESSOR_DEFINITIONS = ( 219 | "DEBUG=1", 220 | "$(inherited)", 221 | ); 222 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 223 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 224 | GCC_WARN_UNDECLARED_SELECTOR = YES; 225 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 226 | GCC_WARN_UNUSED_FUNCTION = YES; 227 | GCC_WARN_UNUSED_VARIABLE = YES; 228 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 229 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 230 | MTL_FAST_MATH = YES; 231 | ONLY_ACTIVE_ARCH = YES; 232 | SDKROOT = iphoneos; 233 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 234 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 235 | }; 236 | name = Debug; 237 | }; 238 | 8F4DCB002177257F00ED5606 /* Release */ = { 239 | isa = XCBuildConfiguration; 240 | buildSettings = { 241 | ALWAYS_SEARCH_USER_PATHS = NO; 242 | CLANG_ANALYZER_NONNULL = YES; 243 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 244 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 245 | CLANG_CXX_LIBRARY = "libc++"; 246 | CLANG_ENABLE_MODULES = YES; 247 | CLANG_ENABLE_OBJC_ARC = YES; 248 | CLANG_ENABLE_OBJC_WEAK = YES; 249 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 250 | CLANG_WARN_BOOL_CONVERSION = YES; 251 | CLANG_WARN_COMMA = YES; 252 | CLANG_WARN_CONSTANT_CONVERSION = YES; 253 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 254 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 255 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 256 | CLANG_WARN_EMPTY_BODY = YES; 257 | CLANG_WARN_ENUM_CONVERSION = YES; 258 | CLANG_WARN_INFINITE_RECURSION = YES; 259 | CLANG_WARN_INT_CONVERSION = YES; 260 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 261 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 262 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 263 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 264 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 265 | CLANG_WARN_STRICT_PROTOTYPES = YES; 266 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 267 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 268 | CLANG_WARN_UNREACHABLE_CODE = YES; 269 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 270 | CODE_SIGN_IDENTITY = "iPhone Developer"; 271 | COPY_PHASE_STRIP = NO; 272 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 273 | ENABLE_NS_ASSERTIONS = NO; 274 | ENABLE_STRICT_OBJC_MSGSEND = YES; 275 | GCC_C_LANGUAGE_STANDARD = gnu11; 276 | GCC_NO_COMMON_BLOCKS = YES; 277 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 278 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 279 | GCC_WARN_UNDECLARED_SELECTOR = YES; 280 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 281 | GCC_WARN_UNUSED_FUNCTION = YES; 282 | GCC_WARN_UNUSED_VARIABLE = YES; 283 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 284 | MTL_ENABLE_DEBUG_INFO = NO; 285 | MTL_FAST_MATH = YES; 286 | SDKROOT = iphoneos; 287 | SWIFT_COMPILATION_MODE = wholemodule; 288 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 289 | VALIDATE_PRODUCT = YES; 290 | }; 291 | name = Release; 292 | }; 293 | 8F4DCB022177257F00ED5606 /* Debug */ = { 294 | isa = XCBuildConfiguration; 295 | buildSettings = { 296 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 297 | CODE_SIGN_STYLE = Automatic; 298 | INFOPLIST_FILE = DemoApp/Info.plist; 299 | LD_RUNPATH_SEARCH_PATHS = ( 300 | "$(inherited)", 301 | "@executable_path/Frameworks", 302 | ); 303 | PRODUCT_BUNDLE_IDENTIFIER = com.simform.DemoApp; 304 | PRODUCT_NAME = "$(TARGET_NAME)"; 305 | SWIFT_VERSION = 4.2; 306 | TARGETED_DEVICE_FAMILY = "1,2"; 307 | }; 308 | name = Debug; 309 | }; 310 | 8F4DCB032177257F00ED5606 /* Release */ = { 311 | isa = XCBuildConfiguration; 312 | buildSettings = { 313 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 314 | CODE_SIGN_STYLE = Automatic; 315 | INFOPLIST_FILE = DemoApp/Info.plist; 316 | LD_RUNPATH_SEARCH_PATHS = ( 317 | "$(inherited)", 318 | "@executable_path/Frameworks", 319 | ); 320 | PRODUCT_BUNDLE_IDENTIFIER = com.simform.DemoApp; 321 | PRODUCT_NAME = "$(TARGET_NAME)"; 322 | SWIFT_VERSION = 4.2; 323 | TARGETED_DEVICE_FAMILY = "1,2"; 324 | }; 325 | name = Release; 326 | }; 327 | /* End XCBuildConfiguration section */ 328 | 329 | /* Begin XCConfigurationList section */ 330 | 8F4DCAEA2177257E00ED5606 /* Build configuration list for PBXProject "DemoApp" */ = { 331 | isa = XCConfigurationList; 332 | buildConfigurations = ( 333 | 8F4DCAFF2177257F00ED5606 /* Debug */, 334 | 8F4DCB002177257F00ED5606 /* Release */, 335 | ); 336 | defaultConfigurationIsVisible = 0; 337 | defaultConfigurationName = Release; 338 | }; 339 | 8F4DCB012177257F00ED5606 /* Build configuration list for PBXNativeTarget "DemoApp" */ = { 340 | isa = XCConfigurationList; 341 | buildConfigurations = ( 342 | 8F4DCB022177257F00ED5606 /* Debug */, 343 | 8F4DCB032177257F00ED5606 /* Release */, 344 | ); 345 | defaultConfigurationIsVisible = 0; 346 | defaultConfigurationName = Release; 347 | }; 348 | /* End XCConfigurationList section */ 349 | }; 350 | rootObject = 8F4DCAE72177257E00ED5606 /* Project object */; 351 | } 352 | --------------------------------------------------------------------------------