├── .gitignore ├── .travis.yml ├── AGVolumeControlView.podspec ├── AGVolumeControlView ├── Assets │ └── .gitkeep └── Classes │ ├── .gitkeep │ ├── AGArcStruct.swift │ ├── AGCircleStruct.swift │ ├── AGIntervalStruct.swift │ ├── AGVolumeControl.swift │ ├── AGVolumeControlDrawView.swift │ ├── AGVolumeControlGradientBackground.swift │ ├── AGVolumeControlLinearGradientBackground.swift │ ├── AGVolumeControlMathHelper.swift │ ├── AGVolumeControlSlider.swift │ └── UIColor+AGColoredGradient.swift ├── Example ├── AGVolumeControlView.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── AGVolumeControlView-Example.xcscheme ├── AGVolumeControlView.xcworkspace │ └── contents.xcworkspacedata ├── AGVolumeControlView │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── LaunchScreen.xib │ │ └── Main.storyboard │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── Icon-40.png │ │ │ ├── Icon-40@2x-1.png │ │ │ ├── Icon-40@2x-2.png │ │ │ ├── Icon-40@2x.png │ │ │ ├── Icon-40@3x.png │ │ │ ├── Icon-41.png │ │ │ ├── Icon-42.png │ │ │ ├── Icon-60@2x.png │ │ │ ├── Icon-60@3x.png │ │ │ ├── Icon-76.png │ │ │ ├── Icon-76@2x.png │ │ │ ├── Icon-Small.png │ │ │ ├── Icon-Small@2x-1.png │ │ │ ├── Icon-Small@2x.png │ │ │ └── Icon-Small@3x.png │ │ ├── Contents.json │ │ ├── playButton.imageset │ │ │ ├── Contents.json │ │ │ └── Play-50.png │ │ └── stopButton.imageset │ │ │ ├── Contents.json │ │ │ └── Stop Filled-50.png │ ├── Info.plist │ ├── ViewController.swift │ └── YDOM.mp3 ├── Podfile ├── Podfile.lock ├── Pods │ ├── Local Podspecs │ │ └── AGVolumeControlView.podspec.json │ ├── Manifest.lock │ ├── Pods.xcodeproj │ │ └── project.pbxproj │ └── Target Support Files │ │ ├── AGVolumeControlView │ │ ├── AGVolumeControlView-dummy.m │ │ ├── AGVolumeControlView-prefix.pch │ │ ├── AGVolumeControlView-umbrella.h │ │ ├── AGVolumeControlView.modulemap │ │ ├── AGVolumeControlView.xcconfig │ │ └── Info.plist │ │ ├── Pods-AGVolumeControlView_Example │ │ ├── Info.plist │ │ ├── Pods-AGVolumeControlView_Example-acknowledgements.markdown │ │ ├── Pods-AGVolumeControlView_Example-acknowledgements.plist │ │ ├── Pods-AGVolumeControlView_Example-dummy.m │ │ ├── Pods-AGVolumeControlView_Example-frameworks.sh │ │ ├── Pods-AGVolumeControlView_Example-resources.sh │ │ ├── Pods-AGVolumeControlView_Example-umbrella.h │ │ ├── Pods-AGVolumeControlView_Example.debug.xcconfig │ │ ├── Pods-AGVolumeControlView_Example.modulemap │ │ └── Pods-AGVolumeControlView_Example.release.xcconfig │ │ └── Pods-AGVolumeControlView_Tests │ │ ├── Info.plist │ │ ├── Pods-AGVolumeControlView_Tests-acknowledgements.markdown │ │ ├── Pods-AGVolumeControlView_Tests-acknowledgements.plist │ │ ├── Pods-AGVolumeControlView_Tests-dummy.m │ │ ├── Pods-AGVolumeControlView_Tests-frameworks.sh │ │ ├── Pods-AGVolumeControlView_Tests-resources.sh │ │ ├── Pods-AGVolumeControlView_Tests-umbrella.h │ │ ├── Pods-AGVolumeControlView_Tests.debug.xcconfig │ │ ├── Pods-AGVolumeControlView_Tests.modulemap │ │ └── Pods-AGVolumeControlView_Tests.release.xcconfig └── Tests │ ├── Info.plist │ └── Tests.swift ├── LICENSE ├── README.md └── _Pods.xcodeproj /.gitignore: -------------------------------------------------------------------------------- 1 | # OS X 2 | .DS_Store 3 | 4 | # Xcode 5 | build/ 6 | *.pbxuser 7 | !default.pbxuser 8 | *.mode1v3 9 | !default.mode1v3 10 | *.mode2v3 11 | !default.mode2v3 12 | *.perspectivev3 13 | !default.perspectivev3 14 | xcuserdata/ 15 | *.xccheckout 16 | profile 17 | *.moved-aside 18 | DerivedData 19 | *.hmap 20 | *.ipa 21 | 22 | # Bundler 23 | .bundle 24 | 25 | Carthage 26 | # We recommend against adding the Pods directory to your .gitignore. However 27 | # you should judge for yourself, the pros and cons are mentioned at: 28 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 29 | # 30 | # Note: if you ignore the Pods directory, make sure to uncomment 31 | # `pod install` in .travis.yml 32 | # 33 | # Pods/ 34 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # references: 2 | # * http://www.objc.io/issue-6/travis-ci.html 3 | # * https://github.com/supermarin/xcpretty#usage 4 | 5 | osx_image: xcode8 6 | language: swift 7 | # cache: cocoapods 8 | # podfile: Example/Podfile 9 | 10 | before_install: 11 | - gem update cocoapods # Since Travis is not always on latest version 12 | # - pod install --project-directory=Example 13 | 14 | script: 15 | - set -o pipefail 16 | - xcodebuild -workspace Example/AGVolumeControlView.xcworkspace -scheme AGVolumeControlView-Example -sdk iphonesimulator10.0 -destination "OS=10.0,name=iPhone 7 Plus" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty -c; 17 | - pod lib lint --allow-warnings 18 | -------------------------------------------------------------------------------- /AGVolumeControlView.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod lib lint AGVolumeControlView.podspec' to ensure this is a 3 | # valid spec before submitting. 4 | # 5 | # Any lines starting with a # are optional, but their use is encouraged 6 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html 7 | # 8 | 9 | Pod::Spec.new do |s| 10 | s.name = 'AGVolumeControlView' 11 | s.version = '0.1.0' 12 | s.summary = 'A short description of AGVolumeControlView.' 13 | s.description = <<-DESC 14 | TODO: Add long description of the pod here. 15 | DESC 16 | 17 | s.homepage = 'https://github.com/agilie/AGVolumeControlView' 18 | s.license = { :type => 'MIT', :file => 'LICENSE' } 19 | s.author = { 'Agilie' => 'info@agilie.com' } 20 | s.source = { :git => 'https://github.com/agilie/AGVolumeControlView.git', :tag => '0.1.0' } 21 | # s.social_media_url = 'https://twitter.com/' 22 | 23 | s.ios.deployment_target = '8.0' 24 | 25 | s.source_files = 'AGVolumeControlView/Classes/**/*.{swift}' 26 | 27 | s.frameworks = 'UIKit' 28 | end 29 | -------------------------------------------------------------------------------- /AGVolumeControlView/Assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agilie/AGVolumeControlView/a31ee85f3b997db85bec79be5f18fb6329d92b45/AGVolumeControlView/Assets/.gitkeep -------------------------------------------------------------------------------- /AGVolumeControlView/Classes/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agilie/AGVolumeControlView/a31ee85f3b997db85bec79be5f18fb6329d92b45/AGVolumeControlView/Classes/.gitkeep -------------------------------------------------------------------------------- /AGVolumeControlView/Classes/AGArcStruct.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AGArcStruct.swift 3 | // AGVolumeControl 4 | // 5 | // Created by Michael Liptuga on 08.06.17. 6 | // Copyright © 2017 Agilie. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | internal struct ArcStruct { 12 | 13 | var circle = CircleStruct(origin: CGPoint.zero, radius: 0) 14 | var startAngle: CGFloat = 0.0 15 | var endAngle: CGFloat = 0.0 16 | 17 | init(circle: CircleStruct, startAngle: CGFloat, endAngle: CGFloat) { 18 | 19 | self.circle = circle 20 | self.startAngle = startAngle 21 | self.endAngle = endAngle 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /AGVolumeControlView/Classes/AGCircleStruct.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AGCircleStruct.swift 3 | // AGVolumeControl 4 | // 5 | // Created by Michael Liptuga on 08.06.17. 6 | // Copyright © 2017 Agilie. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | internal struct CircleStruct { 12 | var origin = CGPoint.zero 13 | var radius: CGFloat = 0 14 | 15 | init(origin: CGPoint, radius: CGFloat) { 16 | assert(radius >= 0, NSLocalizedString("Illegal radius value", comment: "")) 17 | 18 | self.origin = origin 19 | self.radius = radius 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /AGVolumeControlView/Classes/AGIntervalStruct.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AGIntervalStruct.swift 3 | // AGVolumeControl 4 | // 5 | // Created by Michael Liptuga on 08.06.17. 6 | // Copyright © 2017 Agilie. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | internal struct IntervalStruct { 12 | var min: CGFloat = 0.0 13 | var max: CGFloat = 0.0 14 | 15 | init(min: CGFloat, max: CGFloat) { 16 | assert(min <= max, NSLocalizedString("Illegal interval", comment: "")) 17 | self.min = min 18 | self.max = max 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /AGVolumeControlView/Classes/AGVolumeControl.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AGVolumeControl.swift 3 | // AGVolumeControl 4 | // 5 | // Created by Michael Liptuga on 08.06.17. 6 | // Copyright © 2017 Agilie. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @IBDesignable 12 | open class AGVolumeControl: UIControl { 13 | 14 | @IBInspectable 15 | open var thumbRadius: CGFloat = 3.0 16 | 17 | @IBInspectable 18 | open var customBackgroundColor : UIColor? = nil 19 | 20 | @IBInspectable 21 | open var volumeControlSliderColor : UIColor? = nil 22 | 23 | @IBInspectable 24 | open var decibelsLevel : CGFloat = 1.0 25 | 26 | @IBInspectable 27 | open var hueStart : CGFloat = 0.75 28 | 29 | @IBInspectable 30 | open var hueEnd : CGFloat = 1 31 | 32 | @IBInspectable 33 | open var minimumValue: CGFloat = 0.0 34 | 35 | @IBInspectable 36 | open var maximumValue: CGFloat = 1.0 37 | 38 | @IBInspectable 39 | open var thumbColor: UIColor = .blue 40 | 41 | @IBInspectable 42 | open var gradientMaskColor: UIColor = .black 43 | 44 | @IBInspectable 45 | public var saturationStart : CGFloat = 1.0 46 | 47 | @IBInspectable 48 | public var saturationEnd : CGFloat = 0.2 49 | 50 | /** 51 | * The radius of circle 52 | */ 53 | internal var radius: CGFloat { 54 | get { 55 | let radius = min(self.center.x / 4, self.center.y / 4) 56 | return radius 57 | } 58 | } 59 | 60 | internal var volumeControlRadius: CGFloat { 61 | get { 62 | let radius = min(self.center.x / 3.5, self.center.y / 3.5) 63 | return radius 64 | } 65 | } 66 | 67 | internal var maxVolumeHeight: CGFloat { 68 | get { 69 | let maxVolumeHeight = radius * 1.5 70 | return maxVolumeHeight 71 | } 72 | } 73 | 74 | var volumeControlGradientBackground : AGVolumeControlGradientBackground? = nil 75 | 76 | var volumeControlLinearGradientBackground : AGVolumeControlLinearGradientBackground? = nil 77 | 78 | var volumeControlSlider : AGVolumeControlSlider? = nil 79 | 80 | override open var isHighlighted: Bool { 81 | didSet { 82 | setNeedsDisplay() 83 | } 84 | } 85 | 86 | override public init(frame: CGRect) { 87 | super.init(frame: frame) 88 | setup() 89 | } 90 | 91 | required public init?(coder aDecoder: NSCoder) { 92 | super.init(coder: aDecoder) 93 | setup() 94 | } 95 | 96 | internal func setup() { 97 | self.backgroundColor = UIColor.black 98 | } 99 | 100 | public func volumeSliderProgressValue() -> CGFloat 101 | { 102 | return self.volumeControlSlider?.progressValue ?? 0.0 103 | } 104 | 105 | public func updateDecibelsLevel (decibelsLevel : CGFloat) 106 | { 107 | if (self.volumeControlGradientBackground != nil) 108 | { 109 | 110 | let minSize = (self.radius + self.maxVolumeHeight) * 2.5 111 | 112 | let maxSize = min(self.frame.size.width, self.frame.size.height) 113 | let newMaxSize = sqrt(pow(maxSize, 2) + pow(maxSize, 2)) 114 | 115 | let range = newMaxSize - minSize 116 | let scale = (minSize + range * decibelsLevel * self.volumeSliderProgressValue()) / maxSize 117 | 118 | self.volumeControlGradientBackground!.transform = CGAffineTransform.identity 119 | self.volumeControlGradientBackground!.transform = CGAffineTransform(scaleX: scale, y: scale) 120 | } 121 | } 122 | 123 | open override func draw(_ rect: CGRect) 124 | { 125 | self.addVolumeControlGradientBackground() 126 | self.addVolumeControlLinearGradientBackground() 127 | self.addVolumeControlSlider() 128 | } 129 | 130 | open override func beginTracking(_ touch: UITouch, with event: UIEvent?) -> Bool 131 | { 132 | sendActions(for: .editingDidBegin) 133 | self.volumeControlSlider?.beginTracking(touch) 134 | return true 135 | } 136 | 137 | open override func continueTracking(_ touch: UITouch, with event: UIEvent?) -> Bool 138 | { 139 | let angle = self.volumeControlSlider?.continueTracking(touch) 140 | self.rotateVolumeControlLinearGradientBackground(angle: angle!) 141 | sendActions(for: .valueChanged) 142 | return true 143 | } 144 | 145 | open override func endTracking(_ touch: UITouch?, with event: UIEvent?) 146 | { 147 | sendActions(for: .editingDidEnd) 148 | } 149 | } 150 | 151 | extension AGVolumeControl 152 | { 153 | fileprivate func addVolumeControlGradientBackground () 154 | { 155 | if (self.volumeControlGradientBackground == nil) 156 | { 157 | self.volumeControlGradientBackground = AGVolumeControlGradientBackground.init(frame: self.bounds) 158 | self.volumeControlGradientBackground?.radius = self.radius 159 | self.volumeControlGradientBackground?.hueStart = self.hueStart 160 | self.volumeControlGradientBackground?.hueEnd = self.hueEnd 161 | self.volumeControlGradientBackground?.maxVolumeHeight = self.maxVolumeHeight 162 | self.volumeControlGradientBackground?.isUserInteractionEnabled = false 163 | self.addSubview(self.volumeControlGradientBackground!) 164 | } 165 | } 166 | 167 | fileprivate func addVolumeControlLinearGradientBackground () 168 | { 169 | if (self.volumeControlLinearGradientBackground == nil) 170 | { 171 | let minSize = min(self.frame.size.width, self.frame.size.width) 172 | let newSize = sqrt(pow(minSize, 2) + pow(minSize, 2)) 173 | let frame = CGRect(x: (self.frame.width - newSize) / 2, y: (self.frame.height - newSize) / 2, width: newSize, height: newSize) 174 | self.volumeControlLinearGradientBackground = AGVolumeControlLinearGradientBackground.init(frame: frame) 175 | self.volumeControlLinearGradientBackground?.backgroundColor = UIColor.clear 176 | self.volumeControlLinearGradientBackground?.gradientMaskColor = self.gradientMaskColor 177 | self.volumeControlLinearGradientBackground?.isUserInteractionEnabled = false 178 | self.addSubview(self.volumeControlLinearGradientBackground!) 179 | } 180 | } 181 | 182 | fileprivate func addVolumeControlSlider () 183 | { 184 | if (self.volumeControlSlider == nil) 185 | { 186 | self.volumeControlSlider = AGVolumeControlSlider.init(frame: self.bounds) 187 | self.volumeControlSlider?.hueStart = self.hueStart 188 | self.volumeControlSlider?.hueEnd = self.hueEnd 189 | self.volumeControlSlider?.volumeControlRadius = self.volumeControlRadius 190 | self.volumeControlSlider?.radius = self.radius 191 | self.volumeControlSlider?.maxVolumeHeight = self.maxVolumeHeight 192 | self.volumeControlSlider?.minimumValue = self.minimumValue 193 | self.volumeControlSlider?.maximumValue = self.maximumValue 194 | self.volumeControlSlider?.thumbColor = self.thumbColor 195 | self.volumeControlSlider?.thumbRadius = self.thumbRadius 196 | self.volumeControlSlider?.isUserInteractionEnabled = false 197 | 198 | self.addSubview(self.volumeControlSlider!) 199 | } 200 | } 201 | 202 | fileprivate func rotateVolumeControlLinearGradientBackground (angle : CGFloat) 203 | { 204 | guard let volumeControlLinearGradient = self.volumeControlLinearGradientBackground else { 205 | return 206 | } 207 | volumeControlLinearGradient.transform = CGAffineTransform.identity 208 | volumeControlLinearGradient.transform = CGAffineTransform(rotationAngle: angle) 209 | } 210 | } 211 | -------------------------------------------------------------------------------- /AGVolumeControlView/Classes/AGVolumeControlDrawView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AGVolumeControlDrawView.swift 3 | // AGVolumeControl 4 | // 5 | // Created by Michael Liptuga on 09.06.17. 6 | // Copyright © 2017 Agilie. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @IBDesignable 12 | open class AGVolumeControlDrawView: UIView { 13 | 14 | internal var radius: CGFloat = 0.0 15 | 16 | public var thumbRadius: CGFloat = 3.0 17 | 18 | public var hueStart : CGFloat = 0.1 19 | public var hueEnd : CGFloat = 0.2 20 | 21 | public var saturationStart : CGFloat = 1.0 22 | public var saturationEnd : CGFloat = 0.2 23 | 24 | public var maxVolumeHeight : CGFloat = 0.0 25 | 26 | override public init(frame: CGRect) { 27 | super.init(frame: frame) 28 | setup() 29 | } 30 | 31 | required public init?(coder aDecoder: NSCoder) { 32 | super.init(coder: aDecoder) 33 | setup() 34 | } 35 | 36 | func setup () { 37 | 38 | } 39 | 40 | internal static func drawArc(withArc arc: ArcStruct, lineWidth: CGFloat = 2, mode: CGPathDrawingMode = .fillStroke, inContext context: CGContext) { 41 | 42 | let circle = arc.circle 43 | let origin = circle.origin 44 | 45 | UIGraphicsPushContext(context) 46 | context.beginPath() 47 | 48 | context.setLineWidth(lineWidth) 49 | context.setLineCap(CGLineCap.round) 50 | context.addArc(center: origin, radius: circle.radius, startAngle: arc.startAngle, endAngle: arc.endAngle, clockwise: false) 51 | context.move(to: CGPoint(x: origin.x, y: origin.y)) 52 | context.drawPath(using: mode) 53 | 54 | UIGraphicsPopContext() 55 | } 56 | 57 | internal func drawFilledArc(fromAngle startAngle: CGFloat, toAngle endAngle: CGFloat, radius : CGFloat, inContext context: CGContext, color : UIColor, mode: CGPathDrawingMode) { 58 | color.setFill() 59 | color.setStroke() 60 | 61 | let circle = CircleStruct(origin: bounds.center, radius: radius) 62 | let arc = ArcStruct(circle: circle, startAngle: startAngle, endAngle: endAngle) 63 | AGVolumeControlDrawView.drawArc(withArc: arc, lineWidth: 2, mode: mode, inContext: context) 64 | } 65 | 66 | 67 | internal func drawThumb(withAngle angle: CGFloat, inContext context: CGContext) { 68 | let circle = CircleStruct(origin: bounds.center, radius: self.radius) 69 | let thumbOrigin = AGVolumeControlMathHelper.endPoint(fromCircle: circle, angle: angle) 70 | let thumbCircle = CircleStruct(origin: thumbOrigin, radius: thumbRadius) 71 | let thumbArc = ArcStruct(circle: thumbCircle, startAngle: AGVolumeControlMathHelper.circleMinValue, endAngle: AGVolumeControlMathHelper.circleMaxValue) 72 | 73 | AGVolumeControlDrawView.drawArc(withArc: thumbArc, lineWidth: 1, inContext: context) 74 | } 75 | 76 | } 77 | -------------------------------------------------------------------------------- /AGVolumeControlView/Classes/AGVolumeControlGradientBackground.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AGVolumeControlGradientBackground.swift 3 | // AGVolumeControl 4 | // 5 | // Created by Michael Liptuga on 08.06.17. 6 | // Copyright © 2017 Agilie. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | @IBDesignable 13 | open class AGVolumeControlGradientBackground: AGVolumeControlDrawView 14 | { 15 | 16 | public var rotationAngle : CGFloat = 0.0 17 | 18 | fileprivate lazy var gradientBackgroundColor : UIColor = 19 | { 20 | [unowned self] in 21 | return UIColor.backgroundColor(frame: self.frame, scale: 3.0, hueStart: self.hueStart, hueEnd: self.hueEnd) 22 | }() 23 | 24 | override func setup () { 25 | self.backgroundColor = .clear 26 | } 27 | 28 | override open func draw(_ rect: CGRect) { 29 | guard let context = UIGraphicsGetCurrentContext() else { return } 30 | 31 | drawVolumeControlBackgroundColor(withAngle: rotationAngle, inContext: context, size: self.frame.size) 32 | drawRadialGradient(context: context, size: self.frame.size) 33 | } 34 | } 35 | 36 | extension AGVolumeControlGradientBackground 37 | { 38 | internal func drawVolumeControlBackgroundColor (withAngle angle: CGFloat, inContext context: CGContext, size : CGSize) { 39 | self.gradientBackgroundColor.setFill() 40 | 41 | let circle = CircleStruct(origin: bounds.center, radius: 1) 42 | 43 | let thumbOrigin = AGVolumeControlMathHelper.endPoint(fromCircle: circle, angle: angle) 44 | 45 | var minSize = min(size.width, size.height) / 2 /*- self.radius*/ 46 | 47 | minSize = min((self.radius + self.maxVolumeHeight) + (min(bounds.width, bounds.height) / 2), minSize) 48 | 49 | let thumbCircle = CircleStruct(origin: thumbOrigin, radius: minSize) 50 | let thumbArc = ArcStruct(circle: thumbCircle, startAngle: AGVolumeControlMathHelper.circleMinValue, endAngle: AGVolumeControlMathHelper.circleMaxValue) 51 | 52 | AGVolumeControlGradientBackground.drawArc(withArc: thumbArc, lineWidth: 2, inContext: context) 53 | } 54 | 55 | fileprivate func drawRadialGradient (context: CGContext, size : CGSize) 56 | { 57 | let minSize = min(size.width, size.height) 58 | 59 | let gradientSize = CGSize (width: minSize * 1.1, height: minSize * 1.1) 60 | 61 | let colors = [UIColor.clear.cgColor, 62 | UIColor.clear.cgColor, 63 | UIColor.clear.cgColor, 64 | UIColor.clear.cgColor, 65 | UIColor.init(white: 0.0, alpha: 0.1).cgColor, 66 | UIColor.init(white: 0.0, alpha: 0.3).cgColor, 67 | UIColor.init(white: 0.0, alpha: 0.5).cgColor, 68 | UIColor.init(white: 0.0, alpha: 0.7).cgColor, 69 | UIColor.init(white: 0.0, alpha: 0.9).cgColor, 70 | UIColor.init(white: 0.0, alpha: 0.95).cgColor, 71 | UIColor.black.cgColor 72 | ] as CFArray 73 | 74 | let endRadius = min(gradientSize.width, gradientSize.height) / 2 75 | 76 | let center = CGPoint (x: self.center.x - self.frame.origin.x, 77 | y: self.center.y - self.frame.origin.y) 78 | 79 | if let gradient = CGGradient(colorsSpace: nil, colors: colors, locations: nil) { 80 | context.drawRadialGradient(gradient, 81 | startCenter: center, 82 | startRadius: 0.0, 83 | endCenter: center, 84 | endRadius: endRadius, 85 | options: CGGradientDrawingOptions.drawsBeforeStartLocation) 86 | } 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /AGVolumeControlView/Classes/AGVolumeControlLinearGradientBackground.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AGVolumeControlLinearGradientBackground.swift 3 | // Pods 4 | // 5 | // Created by Michael Liptuga on 09.06.17. 6 | // 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | open class AGVolumeControlLinearGradientBackground : UIView 13 | { 14 | public var gradientMaskColor: UIColor = .black 15 | 16 | open override func draw(_ rect: CGRect) { 17 | 18 | guard let context = UIGraphicsGetCurrentContext() else { return } 19 | 20 | let colors = [gradientMaskColor.cgColor, 21 | gradientMaskColor.withAlphaComponent(0.4).cgColor, 22 | UIColor.clear.cgColor 23 | ] as CFArray 24 | 25 | if let gradient = CGGradient(colorsSpace: nil, colors: colors, locations: nil) 26 | { 27 | context.drawLinearGradient(gradient, 28 | start: CGPoint(x: 0, 29 | y: frame.height), 30 | end: CGPoint(x : 0, 31 | y :0), 32 | options: CGGradientDrawingOptions.drawsBeforeStartLocation) 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /AGVolumeControlView/Classes/AGVolumeControlMathHelper.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AGVolumeControlMathHelper.swift 3 | // AGVolumeControl 4 | // 5 | // Created by Michael Liptuga on 08.06.17. 6 | // Copyright © 2017 Agilie. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | internal extension CGVector { 12 | 13 | init(sourcePoint source: CGPoint, endPoint end: CGPoint) { 14 | let dx = end.x - source.x 15 | let dy = end.y - source.y 16 | self.init(dx: dx, dy: dy) 17 | } 18 | 19 | func dotProduct(_ v: CGVector) -> CGFloat { 20 | let dotProduct = (dx * v.dx) + (dy * v.dy) 21 | return dotProduct 22 | } 23 | 24 | func determinant(_ v: CGVector) -> CGFloat { 25 | let determinant = (v.dx * dy) - (dx * v.dy) 26 | return determinant 27 | } 28 | 29 | static func dotProductAndDeterminant(fromSourcePoint source: CGPoint, firstPoint first: CGPoint, secondPoint second: CGPoint) -> (dotProduct: Float, determinant: Float) { 30 | let u = CGVector(sourcePoint: source, endPoint: first) 31 | let v = CGVector(sourcePoint: source, endPoint: second) 32 | 33 | let dotProduct = u.dotProduct(v) 34 | let determinant = u.determinant(v) 35 | return (Float(dotProduct), Float(determinant)) 36 | } 37 | } 38 | 39 | internal extension CGRect { 40 | 41 | // get the center of rect (bounds or frame) 42 | internal var center: CGPoint { 43 | get { 44 | let center = CGPoint(x: midX, y: midY) 45 | return center 46 | } 47 | } 48 | } 49 | 50 | // MARK: - Internal Helper 51 | internal class AGVolumeControlMathHelper { 52 | 53 | @nonobjc static let circleMinValue: CGFloat = 0 54 | @nonobjc static let circleMaxValue: CGFloat = CGFloat(2 * Double.pi) /* - CGFloat.pi / 2 */ 55 | @nonobjc static let circleInitialAngle: CGFloat = -CGFloat(Double.pi / 2) 56 | 57 | internal static func degrees(fromRadians value: CGFloat) -> CGFloat { 58 | return value * 180.0 / CGFloat(Double.pi) 59 | } 60 | 61 | internal static func rad(fromDegrees value: CGFloat) -> CGFloat { 62 | return value / 180 * 3.14 63 | } 64 | 65 | internal static func angle(betweenFirstPoint firstPoint: CGPoint, secondPoint: CGPoint, inCircleWithCenter center: CGPoint) -> CGFloat { 66 | 67 | let uv = CGVector.dotProductAndDeterminant(fromSourcePoint: center, firstPoint: firstPoint, secondPoint: secondPoint) 68 | let angle = atan2(uv.determinant, uv.dotProduct) 69 | 70 | let newAngle = (angle < 0) ? -angle : Float(Double.pi * 2) - angle 71 | return CGFloat(newAngle) 72 | } 73 | 74 | internal static func endPoint(fromCircle circle: CircleStruct, angle: CGFloat) -> CGPoint { 75 | 76 | let x = circle.radius * cos(angle) + circle.origin.x // cos(α) = x / radius 77 | let y = circle.radius * sin(angle) + circle.origin.y // sin(α) = y / radius 78 | let point = CGPoint(x: x, y: y) 79 | 80 | return point 81 | } 82 | 83 | internal static func scaleValue(_ value: CGFloat, fromInterval source: IntervalStruct, toInterval destination: IntervalStruct) -> CGFloat { 84 | let sourceRange = (source.max - source.min) 85 | let destinationRange = (destination.max - destination.min) 86 | let scaledValue = source.min + (value - source.min).truncatingRemainder(dividingBy: sourceRange) 87 | let newValue = (((scaledValue - source.min) * destinationRange) / sourceRange) + destination.min 88 | 89 | return newValue 90 | } 91 | 92 | internal static func scaleToAngle(value aValue: CGFloat, inInterval oldInterval: IntervalStruct) -> CGFloat { 93 | let angleInterval = IntervalStruct(min: circleMinValue , max: circleMaxValue) 94 | 95 | let angle = scaleValue(aValue, fromInterval: oldInterval, toInterval: angleInterval) 96 | return angle 97 | } 98 | 99 | internal static func delta(in interval: IntervalStruct, for angle: CGFloat, oldValue: CGFloat) -> CGFloat { 100 | let angleIntreval = IntervalStruct(min: circleMinValue , max: circleMaxValue) 101 | 102 | let oldAngle = scaleToAngle(value: oldValue, inInterval: interval) 103 | let deltaAngle = self.angle(from: oldAngle, to: angle) 104 | 105 | return scaleValue(deltaAngle, fromInterval: angleIntreval, toInterval: interval) 106 | } 107 | 108 | private static func angle(from alpha: CGFloat, to beta: CGFloat) -> CGFloat { 109 | let halfValue = circleMaxValue/2 110 | // Rotate right 111 | let offset = alpha >= halfValue ? circleMaxValue - alpha : -alpha 112 | let offsetBeta = beta + offset 113 | 114 | if offsetBeta > halfValue { 115 | return offsetBeta - circleMaxValue 116 | } 117 | else { 118 | return offsetBeta 119 | } 120 | } 121 | 122 | internal static func startEndPoints(angle : CGFloat) -> (CGPoint, CGPoint) 123 | { 124 | var currentAngle = self.degrees(fromRadians: angle) 125 | 126 | if currentAngle < 0.0 { 127 | currentAngle = self.degrees(fromRadians: CGFloat.pi * 2) + self.degrees(fromRadians: angle) 128 | } 129 | 130 | // offset of 45 is needed to make logic work 131 | currentAngle = currentAngle + 135 132 | 133 | let multiplier = Int(currentAngle / 360) 134 | if (multiplier > 0) 135 | { 136 | currentAngle = currentAngle - self.degrees(fromRadians: CGFloat.pi * 2 * CGFloat(multiplier)) 137 | } 138 | 139 | var rotCalX: CGFloat = 0.0 140 | var rotCalY: CGFloat = 0.0 141 | 142 | let rotate = currentAngle / 90 143 | 144 | if rotate <= 1 145 | { 146 | rotCalY = rotate 147 | } 148 | else if rotate <= 2 149 | { 150 | rotCalY = 1 151 | rotCalX = rotate - 1 152 | } 153 | else if rotate <= 3 154 | { 155 | rotCalX = 1 156 | rotCalY = 1 - (rotate - 2) 157 | } 158 | else if rotate <= 4 159 | { 160 | rotCalX = 1 - (rotate - 3) 161 | } 162 | 163 | let start = CGPoint(x: 1 - CGFloat(rotCalY), y: 0 + CGFloat(rotCalX)) 164 | let end = CGPoint(x: 0 + CGFloat(rotCalY), y: 1 - CGFloat(rotCalX)) 165 | 166 | return (start, end) 167 | } 168 | } 169 | -------------------------------------------------------------------------------- /AGVolumeControlView/Classes/AGVolumeControlSlider.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AGVolumeControlSlider.swift 3 | // AGVolumeControl 4 | // 5 | // Created by Michael Liptuga on 08.06.17. 6 | // Copyright © 2017 Agilie. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | @IBDesignable 13 | class AGVolumeControlSlider: AGVolumeControlDrawView { 14 | 15 | public var volumeControlRadius: CGFloat = 0.0 16 | 17 | open var minimumValue: CGFloat = 0.0 { 18 | didSet { 19 | if endPointValue < minimumValue { 20 | endPointValue = minimumValue 21 | } 22 | } 23 | } 24 | 25 | open var maximumValue: CGFloat = 1.0 { 26 | didSet { 27 | if endPointValue > maximumValue { 28 | endPointValue = maximumValue 29 | } 30 | } 31 | } 32 | 33 | public var progressValue : CGFloat = 0 34 | 35 | open var endPointValue: CGFloat = 0.0 { 36 | didSet { 37 | if oldValue == endPointValue { 38 | return 39 | } 40 | if endPointValue > maximumValue { 41 | endPointValue = maximumValue 42 | } 43 | setNeedsDisplay() 44 | } 45 | } 46 | 47 | public var thumbColor: UIColor = .white 48 | 49 | public var currentAngle : CGFloat = 0.0 50 | 51 | fileprivate var newTempAngle : CGFloat = 0.0 52 | fileprivate var oldTempAngle : CGFloat = 0.0 53 | 54 | lazy public var volumeControlColor : UIColor = 55 | { 56 | [unowned self] in 57 | return UIColor.сoloredGradientWithSectors(size: self.frame.size, 58 | scale: 3.0, 59 | sectorThickness : 5, 60 | hueStart: self.hueStart, 61 | hueEnd: self.hueEnd, 62 | saturationStart: self.saturationStart, 63 | saturationEnd: self.saturationEnd) 64 | }() 65 | 66 | override func setup() { 67 | self.backgroundColor = UIColor.clear 68 | } 69 | 70 | fileprivate func updateVolumeControl (newValue: CGFloat, touchPoint : CGPoint, progressValue : CGFloat, currentAngle : CGFloat, withTouch : Bool) 71 | { 72 | let frameSize = CGSize(width: volumeControlRadius * 2, height: volumeControlRadius * 2) 73 | let circleBezierPath = self.updateCircleBezierPath(frameSize: frameSize, 74 | newValue: newValue, 75 | touchPoint: touchPoint, 76 | progressValue: progressValue, 77 | currentAngle: currentAngle, 78 | withTouch: withTouch) 79 | self.drawVolumeControl(size: frameSize, circlePath: circleBezierPath) 80 | } 81 | 82 | override open func draw(_ rect: CGRect) { 83 | 84 | guard let context = UIGraphicsGetCurrentContext() else { return } 85 | 86 | let valuesInterval = IntervalStruct(min: minimumValue, max: maximumValue) 87 | let endAngle = AGVolumeControlMathHelper.scaleToAngle(value: endPointValue, inInterval: valuesInterval) + AGVolumeControlMathHelper.circleInitialAngle - 88 | self.progressValue * AGVolumeControlMathHelper.rad(fromDegrees: 7) 89 | 90 | drawFilledArc(fromAngle: AGVolumeControlMathHelper.circleInitialAngle, 91 | toAngle: AGVolumeControlMathHelper.circleMaxValue, 92 | radius: (self.radius + self.maxVolumeHeight) * 1.1, 93 | inContext: context, 94 | color: UIColor.black, 95 | mode: .fill) 96 | 97 | drawFilledArc(fromAngle: AGVolumeControlMathHelper.circleInitialAngle, 98 | toAngle: AGVolumeControlMathHelper.circleMaxValue, 99 | radius: volumeControlRadius, 100 | inContext: context, 101 | color: thumbColor, 102 | mode: .stroke) 103 | 104 | drawThumb(withAngle: endAngle, inContext: context) 105 | } 106 | 107 | public func beginTracking (_ touch: UITouch) 108 | { 109 | let touchPosition = touch.location(in: self) 110 | let startPoint = CGPoint(x: bounds.center.x, y: 0) 111 | 112 | self.newTempAngle = AGVolumeControlMathHelper.angle(betweenFirstPoint: startPoint, 113 | secondPoint: touchPosition, 114 | inCircleWithCenter: bounds.center) 115 | self.oldTempAngle = self.newTempAngle 116 | } 117 | 118 | @discardableResult 119 | public func continueTracking(_ touch: UITouch) -> CGFloat 120 | { 121 | let touchPosition = touch.location(in: self) 122 | let startPoint = CGPoint(x: bounds.center.x, 123 | y: 0) 124 | 125 | let clockwise = self.isClockwise(startPoint: startPoint, 126 | touchPosition: touchPosition) 127 | 128 | let tempAngle = self.newTempAngle + AGVolumeControlMathHelper.angle(betweenFirstPoint: startPoint, 129 | secondPoint: touchPosition, 130 | inCircleWithCenter: bounds.center) - oldTempAngle 131 | 132 | if (tempAngle > 0.0 && tempAngle < CGFloat.pi / 2) && (oldTempAngle <= CGFloat.pi * 2 && oldTempAngle > CGFloat.pi) && clockwise == true { 133 | self.progressValue = 1 134 | self.updateVolumeControlWith(newValue: maximumValue, 135 | currentAngle: CGFloat.pi * 2, 136 | touchPosition: touchPosition) 137 | return CGFloat.pi * 2 138 | } else if tempAngle >= (CGFloat.pi * 3) / 2 && oldTempAngle <= CGFloat.pi / 2 && clockwise == false { 139 | self.progressValue = 0 140 | self.updateVolumeControlWith(newValue: minimumValue, 141 | currentAngle: 0, 142 | touchPosition: touchPosition) 143 | return 0.0 144 | } 145 | if (tempAngle < oldTempAngle && clockwise == false) || (tempAngle > oldTempAngle && clockwise == true) 146 | { 147 | self.newTempAngle += AGVolumeControlMathHelper.angle(betweenFirstPoint: startPoint, 148 | secondPoint: touchPosition, 149 | inCircleWithCenter: bounds.center) - oldTempAngle 150 | let value = newValue(from: endPointValue, 151 | touch: touchPosition, 152 | start: startPoint) 153 | self.progressValue = (maximumValue != 0 && value > 0.1) ? value/maximumValue : 0 154 | self.updateVolumeControlWith(newValue: value, 155 | currentAngle: self.currentAngle, 156 | touchPosition: touchPosition) 157 | return self.currentAngle 158 | } 159 | return self.currentAngle 160 | } 161 | 162 | fileprivate func newSliderValue(from oldValue: CGFloat, touch touchPosition: CGPoint, start startPosition: CGPoint) -> CGFloat 163 | { 164 | self.oldTempAngle = AGVolumeControlMathHelper.angle(betweenFirstPoint: startPosition, secondPoint: touchPosition, inCircleWithCenter: bounds.center) 165 | 166 | self.currentAngle = AGVolumeControlMathHelper.angle(betweenFirstPoint: startPosition, secondPoint: touchPosition, inCircleWithCenter: bounds.center) 167 | let interval = IntervalStruct(min: minimumValue, max: maximumValue) 168 | let deltaValue = AGVolumeControlMathHelper.delta(in: interval, for: self.currentAngle, oldValue: oldValue) 169 | 170 | return oldValue + deltaValue 171 | } 172 | 173 | fileprivate func newValue(from oldValue: CGFloat, touch touchPosition: CGPoint, start startPosition: CGPoint) -> CGFloat { 174 | var newValue = self.newSliderValue(from: oldValue, touch: touchPosition, start: startPosition) 175 | let range = maximumValue - minimumValue 176 | 177 | if newValue > maximumValue { 178 | newValue -= range 179 | } 180 | else if newValue < minimumValue { 181 | newValue += range 182 | } 183 | return newValue 184 | } 185 | } 186 | 187 | extension AGVolumeControlSlider { 188 | 189 | fileprivate func isClockwise (startPoint : CGPoint, touchPosition : CGPoint) -> Bool 190 | { 191 | if (oldTempAngle > (CGFloat.pi * 3) / 2 && AGVolumeControlMathHelper.angle(betweenFirstPoint: startPoint, secondPoint: touchPosition, inCircleWithCenter: bounds.center) < CGFloat.pi && AGVolumeControlMathHelper.angle(betweenFirstPoint: startPoint, secondPoint: touchPosition, inCircleWithCenter: bounds.center) > oldTempAngle - CGFloat.pi * 2) 192 | { 193 | return true 194 | } else if (oldTempAngle > 0 && oldTempAngle <= CGFloat.pi / 2 195 | && AGVolumeControlMathHelper.angle(betweenFirstPoint: startPoint, secondPoint: touchPosition, inCircleWithCenter: bounds.center) <= 2 * CGFloat.pi 196 | && AGVolumeControlMathHelper.angle(betweenFirstPoint: startPoint, secondPoint: touchPosition, inCircleWithCenter: bounds.center) >= 3 * CGFloat.pi / 2) 197 | { 198 | return false 199 | } else { 200 | return AGVolumeControlMathHelper.angle(betweenFirstPoint: startPoint, secondPoint: touchPosition, inCircleWithCenter: bounds.center) > oldTempAngle 201 | } 202 | } 203 | 204 | fileprivate func updateVolumeControlWith (newValue : CGFloat, currentAngle : CGFloat, touchPosition : CGPoint) 205 | { 206 | self.updateVolumeControl(newValue: newValue / 3, touchPoint: touchPosition, progressValue: self.progressValue, currentAngle: currentAngle, withTouch: true) 207 | endPointValue = newValue 208 | } 209 | 210 | 211 | fileprivate func updateCircleBezierPath(frameSize : CGSize, newValue: CGFloat, touchPoint : CGPoint, progressValue : CGFloat, currentAngle : CGFloat, withTouch : Bool) -> UIBezierPath { 212 | self.removeSublayers() 213 | 214 | let circleBezierPath = UIBezierPath.init() 215 | 216 | var firstPoint : CGPoint? = nil 217 | 218 | let startAngle = Int(AGVolumeControlMathHelper.degrees(fromRadians: (CGFloat.pi * 3) / 2)) 219 | let endAngle = Int(AGVolumeControlMathHelper.degrees(fromRadians: (CGFloat.pi * 7) / 2)) 220 | 221 | for i in startAngle...endAngle 222 | { 223 | if (i % 6) == 0 { 224 | let volumeControlParams = self.radiusAndAngleFor(circlePointIndex: i, 225 | currentAngle: currentAngle, 226 | newValue: newValue, 227 | progressValue: progressValue) 228 | 229 | let x = frameSize.width/2 + (self.frame.width - frameSize.width)/2 + volumeControlParams.radius * cos(volumeControlParams.rad) 230 | let y = frameSize.height/2 + (self.frame.height - frameSize.height)/2 + volumeControlParams.radius * sin(volumeControlParams.rad) 231 | 232 | if (firstPoint == nil) { 233 | firstPoint = CGPoint(x: x, y: y) 234 | circleBezierPath.move(to: firstPoint!) 235 | } 236 | 237 | let center = CGPoint(x: self.frame.width / 2, y: self.frame.height / 2) 238 | 239 | let currentCurrent = volumeControlParams.rad 240 | 241 | let currentCurrent2 = AGVolumeControlMathHelper.rad(fromDegrees: CGFloat(i+1)) 242 | 243 | circleBezierPath.addArc(withCenter: center, 244 | radius: volumeControlParams.radius, 245 | startAngle: currentCurrent, 246 | endAngle: currentCurrent2, 247 | clockwise: true) 248 | } 249 | } 250 | circleBezierPath.close() 251 | circleBezierPath.lineCapStyle = .round 252 | return circleBezierPath 253 | } 254 | 255 | fileprivate func radiusAndAngleFor (circlePointIndex: Int, currentAngle : CGFloat, newValue: CGFloat, progressValue: CGFloat) -> (radius : CGFloat, rad: CGFloat) 256 | { 257 | var rad = AGVolumeControlMathHelper.rad(fromDegrees: CGFloat(circlePointIndex)) 258 | let correctionAngle = (CGFloat.pi + CGFloat.pi / 2) 259 | var height : CGFloat = 0.0 260 | 261 | let heightNewValue = self.maxVolumeHeight * progressValue + 0.0 262 | 263 | if (rad - correctionAngle) <= currentAngle { 264 | let angle = rad - correctionAngle 265 | height = CGFloat(heightNewValue * CGFloat(CGFloat(angle - AGVolumeControlMathHelper.circleMinValue) / CGFloat(AGVolumeControlMathHelper.circleMaxValue - AGVolumeControlMathHelper.circleMinValue))) 266 | } 267 | 268 | //Use it Only for gradient color with sectors 269 | let correctionBezierMinAngle = AGVolumeControlMathHelper.rad(fromDegrees: CGFloat(circlePointIndex - 4)) 270 | let correctionBezierMaxAngle = AGVolumeControlMathHelper.rad(fromDegrees: CGFloat(circlePointIndex + 4)) 271 | 272 | if (correctionBezierMinAngle - correctionAngle) <= currentAngle 273 | && (correctionBezierMaxAngle - correctionAngle) >= currentAngle 274 | { 275 | height = 0.0 276 | rad = AGVolumeControlMathHelper.rad(fromDegrees: CGFloat(circlePointIndex - 5)) 277 | } 278 | let r = volumeControlRadius + height 279 | return (radius : r, rad : rad) 280 | } 281 | 282 | fileprivate func drawVolumeControl (size : CGSize, circlePath : UIBezierPath) 283 | { 284 | let shapeLayer:CAShapeLayer = CAShapeLayer() 285 | 286 | let shapeRect = CGRect(x: 0, 287 | y: 0, 288 | width: size.width, 289 | height: size.height) 290 | 291 | shapeLayer.bounds = shapeRect 292 | shapeLayer.position = CGPoint(x: size.width/2, y: size.height/2) 293 | 294 | shapeLayer.fillColor = self.volumeControlColor.cgColor 295 | 296 | shapeLayer.fillRule = kCAFillRuleEvenOdd 297 | shapeLayer.lineJoin = kCALineJoinRound 298 | shapeLayer.opacity = 1.0 299 | 300 | let shapeLayerBezier = UIBezierPath() 301 | 302 | shapeLayerBezier.append(circlePath) 303 | 304 | let innerCircleBezierRect = CGRect(x: (self.frame.size.width - size.width) / 2, 305 | y: (self.frame.size.height - size.height) / 2, 306 | width: size.width, 307 | height: size.height) 308 | 309 | let innerCircleBezier = UIBezierPath.init(roundedRect: innerCircleBezierRect, 310 | cornerRadius: innerCircleBezierRect.height/2) 311 | innerCircleBezier.close() 312 | 313 | shapeLayerBezier.append(innerCircleBezier) 314 | shapeLayerBezier.close() 315 | 316 | shapeLayer.path = shapeLayerBezier.cgPath 317 | 318 | self.layer.addSublayer(shapeLayer) 319 | } 320 | 321 | fileprivate func removeSublayers() { 322 | if let sublayers = self.layer.sublayers 323 | { 324 | for layer in sublayers 325 | { 326 | layer.removeFromSuperlayer() 327 | } 328 | } 329 | } 330 | } 331 | -------------------------------------------------------------------------------- /AGVolumeControlView/Classes/UIColor+AGColoredGradient.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ColoredGradientColorWithSectors.swift 3 | // VolumeControl 4 | // 5 | // Created by Michael Liptuga on 31.05.17. 6 | // Copyright © 2017 Agilie. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | extension UIColor 13 | { 14 | public class func сoloredGradientWithSectors(size : CGSize, 15 | scale : CGFloat, 16 | sectorThickness : Int, 17 | hueStart : CGFloat, 18 | hueEnd : CGFloat, 19 | saturationStart : CGFloat, 20 | saturationEnd : CGFloat) -> UIColor { 21 | 22 | UIGraphicsBeginImageContextWithOptions(size, false, scale) 23 | 24 | let sectors : Int = 360 25 | 26 | let center = CGPoint(x: size.width / 2, 27 | y: size.height / 2) 28 | 29 | let angle = 2 * CGFloat.pi/CGFloat(sectors) 30 | 31 | let thickness = max(sectorThickness, 1) 32 | 33 | let gradientColor = UIColor.circleSpectrumGradientColor(size: size, 34 | scale: scale, 35 | hueStart: hueStart, 36 | hueEnd: hueEnd, 37 | saturationStart: saturationStart, 38 | saturationEnd: saturationEnd) 39 | for i in 0.. UIColor 70 | { 71 | 72 | if let spectrumImage = self.circleSpectrumGradientImage(size: size, 73 | scale: scale, 74 | hueStart: hueStart, 75 | hueEnd: hueEnd, 76 | saturationStart: saturationStart, 77 | saturationEnd: saturationEnd, 78 | centerPoint: nil) 79 | { 80 | return UIColor.init(patternImage: spectrumImage) 81 | } 82 | return UIColor.white 83 | } 84 | 85 | public class func circleSpectrumGradientColor (size: CGSize, 86 | scale : CGFloat, 87 | hueStart : CGFloat, 88 | hueEnd : CGFloat, 89 | saturationStart : CGFloat, 90 | saturationEnd : CGFloat, 91 | centerPoint: CGPoint?) -> UIColor 92 | { 93 | 94 | if let spectrumImage = self.circleSpectrumGradientImage(size: size, 95 | scale: scale, 96 | hueStart: hueStart, 97 | hueEnd: hueEnd, 98 | saturationStart: saturationStart, 99 | saturationEnd: saturationEnd, 100 | centerPoint: centerPoint) 101 | { 102 | return UIColor.init(patternImage: spectrumImage) 103 | } 104 | return UIColor.white 105 | } 106 | 107 | public class func backgroundColor (frame: CGRect, 108 | scale : CGFloat, 109 | hueStart : CGFloat, 110 | hueEnd : CGFloat) -> UIColor 111 | { 112 | let maxSize = min(frame.size.width, frame.size.height) 113 | let newFrameSize : CGFloat = CGFloat(sqrt(pow(maxSize * 2, 2) + pow(maxSize * 2, 2))) 114 | 115 | let minHue = min(hueStart, hueEnd) 116 | let maxHue = max(hueStart, hueEnd) 117 | 118 | let range = maxHue - minHue 119 | 120 | var centerPoint = CGPoint (x: frame.center.x - frame.origin.x, 121 | y: frame.center.y - frame.origin.y) 122 | switch maxHue { 123 | case 0.00001..<0.25: 124 | centerPoint.x -= (maxSize / 1.5) / (1 / (1 - range)) 125 | centerPoint.y -= (maxSize / 1.5) / (1 / (1 - range)) 126 | case 0.25..<0.5: 127 | centerPoint.x -= (maxSize / 1.5) / (1 / (1 - range)) 128 | centerPoint.y += (maxSize / 1.5) / (1 / (1 - range)) 129 | case 0.5..<0.75: 130 | centerPoint.x += (maxSize / 1.5) / (1 / (1 - range)) 131 | centerPoint.y += (maxSize / 1.5) / (1 / (1 - range)) 132 | default: 133 | centerPoint.x += (maxSize / 1.5) / (1 / (1 - range)) 134 | centerPoint.y -= (maxSize / 1.5) / (1 / (1 - range)) 135 | } 136 | 137 | let size : CGSize = CGSize(width: newFrameSize, height: newFrameSize) 138 | 139 | return self.circleSpectrumGradientColor(size: size, 140 | scale: 3, 141 | hueStart: 0, 142 | hueEnd: 1, 143 | saturationStart: 1, 144 | saturationEnd: 1, 145 | centerPoint: centerPoint) 146 | } 147 | 148 | private class func circleSpectrumGradientImage (size: CGSize, 149 | scale : CGFloat, 150 | hueStart : CGFloat, 151 | hueEnd : CGFloat, 152 | saturationStart : CGFloat, 153 | saturationEnd : CGFloat, 154 | centerPoint: CGPoint?) -> UIImage? 155 | { 156 | UIGraphicsBeginImageContextWithOptions(size, false, scale) 157 | 158 | let sectors : Int = 720 159 | let startAngle : Int = 180 160 | 161 | var center = CGPoint(x: size.width / 2, y: size.height / 2) 162 | if centerPoint != nil { 163 | center = centerPoint! 164 | } 165 | 166 | let angle = 2 * CGFloat.pi/CGFloat(sectors) 167 | 168 | let hueRange = max(hueStart, hueEnd) - min(hueStart, hueEnd) 169 | let saturationRange = max(saturationStart, saturationEnd) - min(saturationStart, saturationEnd) 170 | 171 | for i in startAngle.. /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"; 299 | showEnvVarsInLog = 0; 300 | }; 301 | 5F5F34EDF929020DD21F20FA /* [CP] Embed Pods Frameworks */ = { 302 | isa = PBXShellScriptBuildPhase; 303 | buildActionMask = 2147483647; 304 | files = ( 305 | ); 306 | inputPaths = ( 307 | ); 308 | name = "[CP] Embed Pods Frameworks"; 309 | outputPaths = ( 310 | ); 311 | runOnlyForDeploymentPostprocessing = 0; 312 | shellPath = /bin/sh; 313 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-AGVolumeControlView_Example/Pods-AGVolumeControlView_Example-frameworks.sh\"\n"; 314 | showEnvVarsInLog = 0; 315 | }; 316 | 894383DA13060DDBA4BC0EC5 /* [CP] Check Pods Manifest.lock */ = { 317 | isa = PBXShellScriptBuildPhase; 318 | buildActionMask = 2147483647; 319 | files = ( 320 | ); 321 | inputPaths = ( 322 | ); 323 | name = "[CP] Check Pods Manifest.lock"; 324 | outputPaths = ( 325 | ); 326 | runOnlyForDeploymentPostprocessing = 0; 327 | shellPath = /bin/sh; 328 | 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"; 329 | showEnvVarsInLog = 0; 330 | }; 331 | 9CBB8999718068439CC3C30D /* [CP] Embed Pods Frameworks */ = { 332 | isa = PBXShellScriptBuildPhase; 333 | buildActionMask = 2147483647; 334 | files = ( 335 | ); 336 | inputPaths = ( 337 | ); 338 | name = "[CP] Embed Pods Frameworks"; 339 | outputPaths = ( 340 | ); 341 | runOnlyForDeploymentPostprocessing = 0; 342 | shellPath = /bin/sh; 343 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-AGVolumeControlView_Tests/Pods-AGVolumeControlView_Tests-frameworks.sh\"\n"; 344 | showEnvVarsInLog = 0; 345 | }; 346 | E0AE5E59428EEEAAF1A7F1EE /* [CP] Copy Pods Resources */ = { 347 | isa = PBXShellScriptBuildPhase; 348 | buildActionMask = 2147483647; 349 | files = ( 350 | ); 351 | inputPaths = ( 352 | ); 353 | name = "[CP] Copy Pods Resources"; 354 | outputPaths = ( 355 | ); 356 | runOnlyForDeploymentPostprocessing = 0; 357 | shellPath = /bin/sh; 358 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-AGVolumeControlView_Tests/Pods-AGVolumeControlView_Tests-resources.sh\"\n"; 359 | showEnvVarsInLog = 0; 360 | }; 361 | /* End PBXShellScriptBuildPhase section */ 362 | 363 | /* Begin PBXSourcesBuildPhase section */ 364 | 607FACCC1AFB9204008FA782 /* Sources */ = { 365 | isa = PBXSourcesBuildPhase; 366 | buildActionMask = 2147483647; 367 | files = ( 368 | 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */, 369 | 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */, 370 | ); 371 | runOnlyForDeploymentPostprocessing = 0; 372 | }; 373 | 607FACE11AFB9204008FA782 /* Sources */ = { 374 | isa = PBXSourcesBuildPhase; 375 | buildActionMask = 2147483647; 376 | files = ( 377 | 607FACEC1AFB9204008FA782 /* Tests.swift in Sources */, 378 | ); 379 | runOnlyForDeploymentPostprocessing = 0; 380 | }; 381 | /* End PBXSourcesBuildPhase section */ 382 | 383 | /* Begin PBXTargetDependency section */ 384 | 607FACE71AFB9204008FA782 /* PBXTargetDependency */ = { 385 | isa = PBXTargetDependency; 386 | target = 607FACCF1AFB9204008FA782 /* AGVolumeControlView_Example */; 387 | targetProxy = 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */; 388 | }; 389 | /* End PBXTargetDependency section */ 390 | 391 | /* Begin PBXVariantGroup section */ 392 | 607FACD91AFB9204008FA782 /* Main.storyboard */ = { 393 | isa = PBXVariantGroup; 394 | children = ( 395 | 607FACDA1AFB9204008FA782 /* Base */, 396 | ); 397 | name = Main.storyboard; 398 | sourceTree = ""; 399 | }; 400 | 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */ = { 401 | isa = PBXVariantGroup; 402 | children = ( 403 | 607FACDF1AFB9204008FA782 /* Base */, 404 | ); 405 | name = LaunchScreen.xib; 406 | sourceTree = ""; 407 | }; 408 | /* End PBXVariantGroup section */ 409 | 410 | /* Begin XCBuildConfiguration section */ 411 | 607FACED1AFB9204008FA782 /* Debug */ = { 412 | isa = XCBuildConfiguration; 413 | buildSettings = { 414 | ALWAYS_SEARCH_USER_PATHS = NO; 415 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 416 | CLANG_CXX_LIBRARY = "libc++"; 417 | CLANG_ENABLE_MODULES = YES; 418 | CLANG_ENABLE_OBJC_ARC = YES; 419 | CLANG_WARN_BOOL_CONVERSION = YES; 420 | CLANG_WARN_CONSTANT_CONVERSION = YES; 421 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 422 | CLANG_WARN_EMPTY_BODY = YES; 423 | CLANG_WARN_ENUM_CONVERSION = YES; 424 | CLANG_WARN_INFINITE_RECURSION = YES; 425 | CLANG_WARN_INT_CONVERSION = YES; 426 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 427 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 428 | CLANG_WARN_UNREACHABLE_CODE = YES; 429 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 430 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 431 | COPY_PHASE_STRIP = NO; 432 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 433 | ENABLE_STRICT_OBJC_MSGSEND = YES; 434 | ENABLE_TESTABILITY = YES; 435 | GCC_C_LANGUAGE_STANDARD = gnu99; 436 | GCC_DYNAMIC_NO_PIC = NO; 437 | GCC_NO_COMMON_BLOCKS = YES; 438 | GCC_OPTIMIZATION_LEVEL = 0; 439 | GCC_PREPROCESSOR_DEFINITIONS = ( 440 | "DEBUG=1", 441 | "$(inherited)", 442 | ); 443 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 444 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 445 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 446 | GCC_WARN_UNDECLARED_SELECTOR = YES; 447 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 448 | GCC_WARN_UNUSED_FUNCTION = YES; 449 | GCC_WARN_UNUSED_VARIABLE = YES; 450 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 451 | MTL_ENABLE_DEBUG_INFO = YES; 452 | ONLY_ACTIVE_ARCH = YES; 453 | SDKROOT = iphoneos; 454 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 455 | }; 456 | name = Debug; 457 | }; 458 | 607FACEE1AFB9204008FA782 /* Release */ = { 459 | isa = XCBuildConfiguration; 460 | buildSettings = { 461 | ALWAYS_SEARCH_USER_PATHS = NO; 462 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 463 | CLANG_CXX_LIBRARY = "libc++"; 464 | CLANG_ENABLE_MODULES = YES; 465 | CLANG_ENABLE_OBJC_ARC = YES; 466 | CLANG_WARN_BOOL_CONVERSION = YES; 467 | CLANG_WARN_CONSTANT_CONVERSION = YES; 468 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 469 | CLANG_WARN_EMPTY_BODY = YES; 470 | CLANG_WARN_ENUM_CONVERSION = YES; 471 | CLANG_WARN_INFINITE_RECURSION = YES; 472 | CLANG_WARN_INT_CONVERSION = YES; 473 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 474 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 475 | CLANG_WARN_UNREACHABLE_CODE = YES; 476 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 477 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 478 | COPY_PHASE_STRIP = NO; 479 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 480 | ENABLE_NS_ASSERTIONS = NO; 481 | ENABLE_STRICT_OBJC_MSGSEND = YES; 482 | GCC_C_LANGUAGE_STANDARD = gnu99; 483 | GCC_NO_COMMON_BLOCKS = YES; 484 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 485 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 486 | GCC_WARN_UNDECLARED_SELECTOR = YES; 487 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 488 | GCC_WARN_UNUSED_FUNCTION = YES; 489 | GCC_WARN_UNUSED_VARIABLE = YES; 490 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 491 | MTL_ENABLE_DEBUG_INFO = NO; 492 | SDKROOT = iphoneos; 493 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 494 | VALIDATE_PRODUCT = YES; 495 | }; 496 | name = Release; 497 | }; 498 | 607FACF01AFB9204008FA782 /* Debug */ = { 499 | isa = XCBuildConfiguration; 500 | baseConfigurationReference = 1D5550E6CC4F0485CD45F33E /* Pods-AGVolumeControlView_Example.debug.xcconfig */; 501 | buildSettings = { 502 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 503 | INFOPLIST_FILE = AGVolumeControlView/Info.plist; 504 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 505 | MODULE_NAME = ExampleApp; 506 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; 507 | PRODUCT_NAME = "$(TARGET_NAME)"; 508 | SWIFT_VERSION = 3.0; 509 | }; 510 | name = Debug; 511 | }; 512 | 607FACF11AFB9204008FA782 /* Release */ = { 513 | isa = XCBuildConfiguration; 514 | baseConfigurationReference = EAC6D158E9C6B2446883F984 /* Pods-AGVolumeControlView_Example.release.xcconfig */; 515 | buildSettings = { 516 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 517 | INFOPLIST_FILE = AGVolumeControlView/Info.plist; 518 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 519 | MODULE_NAME = ExampleApp; 520 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; 521 | PRODUCT_NAME = "$(TARGET_NAME)"; 522 | SWIFT_VERSION = 3.0; 523 | }; 524 | name = Release; 525 | }; 526 | 607FACF31AFB9204008FA782 /* Debug */ = { 527 | isa = XCBuildConfiguration; 528 | baseConfigurationReference = 35E7FE0A6859B55E75C9DDD2 /* Pods-AGVolumeControlView_Tests.debug.xcconfig */; 529 | buildSettings = { 530 | FRAMEWORK_SEARCH_PATHS = ( 531 | "$(SDKROOT)/Developer/Library/Frameworks", 532 | "$(inherited)", 533 | ); 534 | GCC_PREPROCESSOR_DEFINITIONS = ( 535 | "DEBUG=1", 536 | "$(inherited)", 537 | ); 538 | INFOPLIST_FILE = Tests/Info.plist; 539 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 540 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; 541 | PRODUCT_NAME = "$(TARGET_NAME)"; 542 | SWIFT_VERSION = 3.0; 543 | }; 544 | name = Debug; 545 | }; 546 | 607FACF41AFB9204008FA782 /* Release */ = { 547 | isa = XCBuildConfiguration; 548 | baseConfigurationReference = ECF7ACA42F6E97A394C94785 /* Pods-AGVolumeControlView_Tests.release.xcconfig */; 549 | buildSettings = { 550 | FRAMEWORK_SEARCH_PATHS = ( 551 | "$(SDKROOT)/Developer/Library/Frameworks", 552 | "$(inherited)", 553 | ); 554 | INFOPLIST_FILE = Tests/Info.plist; 555 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 556 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; 557 | PRODUCT_NAME = "$(TARGET_NAME)"; 558 | SWIFT_VERSION = 3.0; 559 | }; 560 | name = Release; 561 | }; 562 | /* End XCBuildConfiguration section */ 563 | 564 | /* Begin XCConfigurationList section */ 565 | 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "AGVolumeControlView" */ = { 566 | isa = XCConfigurationList; 567 | buildConfigurations = ( 568 | 607FACED1AFB9204008FA782 /* Debug */, 569 | 607FACEE1AFB9204008FA782 /* Release */, 570 | ); 571 | defaultConfigurationIsVisible = 0; 572 | defaultConfigurationName = Release; 573 | }; 574 | 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "AGVolumeControlView_Example" */ = { 575 | isa = XCConfigurationList; 576 | buildConfigurations = ( 577 | 607FACF01AFB9204008FA782 /* Debug */, 578 | 607FACF11AFB9204008FA782 /* Release */, 579 | ); 580 | defaultConfigurationIsVisible = 0; 581 | defaultConfigurationName = Release; 582 | }; 583 | 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "AGVolumeControlView_Tests" */ = { 584 | isa = XCConfigurationList; 585 | buildConfigurations = ( 586 | 607FACF31AFB9204008FA782 /* Debug */, 587 | 607FACF41AFB9204008FA782 /* Release */, 588 | ); 589 | defaultConfigurationIsVisible = 0; 590 | defaultConfigurationName = Release; 591 | }; 592 | /* End XCConfigurationList section */ 593 | }; 594 | rootObject = 607FACC81AFB9204008FA782 /* Project object */; 595 | } 596 | -------------------------------------------------------------------------------- /Example/AGVolumeControlView.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/AGVolumeControlView.xcodeproj/xcshareddata/xcschemes/AGVolumeControlView-Example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 67 | 68 | 78 | 80 | 86 | 87 | 88 | 89 | 90 | 91 | 97 | 99 | 105 | 106 | 107 | 108 | 110 | 111 | 114 | 115 | 116 | -------------------------------------------------------------------------------- /Example/AGVolumeControlView.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/AGVolumeControlView/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // AGVolumeControlView 4 | // 5 | // Created by liptugamichael@gmail.com on 06/09/2017. 6 | // Copyright (c) 2017 liptugamichael@gmail.com. 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 throttle down OpenGL ES frame rates. 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 inactive 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 | -------------------------------------------------------------------------------- /Example/AGVolumeControlView/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Example/AGVolumeControlView/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 | 54 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /Example/AGVolumeControlView/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-40.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-40@2x-1.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-Small@2x.png", 19 | "scale" : "2x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-Small@3x.png", 25 | "scale" : "3x" 26 | }, 27 | { 28 | "size" : "40x40", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-40@2x.png", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-40@3x.png", 37 | "scale" : "3x" 38 | }, 39 | { 40 | "size" : "60x60", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-60@2x.png", 43 | "scale" : "2x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-60@3x.png", 49 | "scale" : "3x" 50 | }, 51 | { 52 | "idiom" : "ipad", 53 | "size" : "20x20", 54 | "scale" : "1x" 55 | }, 56 | { 57 | "size" : "20x20", 58 | "idiom" : "ipad", 59 | "filename" : "Icon-42.png", 60 | "scale" : "2x" 61 | }, 62 | { 63 | "size" : "29x29", 64 | "idiom" : "ipad", 65 | "filename" : "Icon-Small.png", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "size" : "29x29", 70 | "idiom" : "ipad", 71 | "filename" : "Icon-Small@2x-1.png", 72 | "scale" : "2x" 73 | }, 74 | { 75 | "size" : "40x40", 76 | "idiom" : "ipad", 77 | "filename" : "Icon-41.png", 78 | "scale" : "1x" 79 | }, 80 | { 81 | "size" : "40x40", 82 | "idiom" : "ipad", 83 | "filename" : "Icon-40@2x-2.png", 84 | "scale" : "2x" 85 | }, 86 | { 87 | "size" : "76x76", 88 | "idiom" : "ipad", 89 | "filename" : "Icon-76.png", 90 | "scale" : "1x" 91 | }, 92 | { 93 | "size" : "76x76", 94 | "idiom" : "ipad", 95 | "filename" : "Icon-76@2x.png", 96 | "scale" : "2x" 97 | }, 98 | { 99 | "idiom" : "ipad", 100 | "size" : "83.5x83.5", 101 | "scale" : "2x" 102 | } 103 | ], 104 | "info" : { 105 | "version" : 1, 106 | "author" : "xcode" 107 | } 108 | } -------------------------------------------------------------------------------- /Example/AGVolumeControlView/Images.xcassets/AppIcon.appiconset/Icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agilie/AGVolumeControlView/a31ee85f3b997db85bec79be5f18fb6329d92b45/Example/AGVolumeControlView/Images.xcassets/AppIcon.appiconset/Icon-40.png -------------------------------------------------------------------------------- /Example/AGVolumeControlView/Images.xcassets/AppIcon.appiconset/Icon-40@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agilie/AGVolumeControlView/a31ee85f3b997db85bec79be5f18fb6329d92b45/Example/AGVolumeControlView/Images.xcassets/AppIcon.appiconset/Icon-40@2x-1.png -------------------------------------------------------------------------------- /Example/AGVolumeControlView/Images.xcassets/AppIcon.appiconset/Icon-40@2x-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agilie/AGVolumeControlView/a31ee85f3b997db85bec79be5f18fb6329d92b45/Example/AGVolumeControlView/Images.xcassets/AppIcon.appiconset/Icon-40@2x-2.png -------------------------------------------------------------------------------- /Example/AGVolumeControlView/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agilie/AGVolumeControlView/a31ee85f3b997db85bec79be5f18fb6329d92b45/Example/AGVolumeControlView/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png -------------------------------------------------------------------------------- /Example/AGVolumeControlView/Images.xcassets/AppIcon.appiconset/Icon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agilie/AGVolumeControlView/a31ee85f3b997db85bec79be5f18fb6329d92b45/Example/AGVolumeControlView/Images.xcassets/AppIcon.appiconset/Icon-40@3x.png -------------------------------------------------------------------------------- /Example/AGVolumeControlView/Images.xcassets/AppIcon.appiconset/Icon-41.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agilie/AGVolumeControlView/a31ee85f3b997db85bec79be5f18fb6329d92b45/Example/AGVolumeControlView/Images.xcassets/AppIcon.appiconset/Icon-41.png -------------------------------------------------------------------------------- /Example/AGVolumeControlView/Images.xcassets/AppIcon.appiconset/Icon-42.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agilie/AGVolumeControlView/a31ee85f3b997db85bec79be5f18fb6329d92b45/Example/AGVolumeControlView/Images.xcassets/AppIcon.appiconset/Icon-42.png -------------------------------------------------------------------------------- /Example/AGVolumeControlView/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agilie/AGVolumeControlView/a31ee85f3b997db85bec79be5f18fb6329d92b45/Example/AGVolumeControlView/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png -------------------------------------------------------------------------------- /Example/AGVolumeControlView/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agilie/AGVolumeControlView/a31ee85f3b997db85bec79be5f18fb6329d92b45/Example/AGVolumeControlView/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png -------------------------------------------------------------------------------- /Example/AGVolumeControlView/Images.xcassets/AppIcon.appiconset/Icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agilie/AGVolumeControlView/a31ee85f3b997db85bec79be5f18fb6329d92b45/Example/AGVolumeControlView/Images.xcassets/AppIcon.appiconset/Icon-76.png -------------------------------------------------------------------------------- /Example/AGVolumeControlView/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agilie/AGVolumeControlView/a31ee85f3b997db85bec79be5f18fb6329d92b45/Example/AGVolumeControlView/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png -------------------------------------------------------------------------------- /Example/AGVolumeControlView/Images.xcassets/AppIcon.appiconset/Icon-Small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agilie/AGVolumeControlView/a31ee85f3b997db85bec79be5f18fb6329d92b45/Example/AGVolumeControlView/Images.xcassets/AppIcon.appiconset/Icon-Small.png -------------------------------------------------------------------------------- /Example/AGVolumeControlView/Images.xcassets/AppIcon.appiconset/Icon-Small@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agilie/AGVolumeControlView/a31ee85f3b997db85bec79be5f18fb6329d92b45/Example/AGVolumeControlView/Images.xcassets/AppIcon.appiconset/Icon-Small@2x-1.png -------------------------------------------------------------------------------- /Example/AGVolumeControlView/Images.xcassets/AppIcon.appiconset/Icon-Small@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agilie/AGVolumeControlView/a31ee85f3b997db85bec79be5f18fb6329d92b45/Example/AGVolumeControlView/Images.xcassets/AppIcon.appiconset/Icon-Small@2x.png -------------------------------------------------------------------------------- /Example/AGVolumeControlView/Images.xcassets/AppIcon.appiconset/Icon-Small@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agilie/AGVolumeControlView/a31ee85f3b997db85bec79be5f18fb6329d92b45/Example/AGVolumeControlView/Images.xcassets/AppIcon.appiconset/Icon-Small@3x.png -------------------------------------------------------------------------------- /Example/AGVolumeControlView/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Example/AGVolumeControlView/Images.xcassets/playButton.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Play-50.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/AGVolumeControlView/Images.xcassets/playButton.imageset/Play-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agilie/AGVolumeControlView/a31ee85f3b997db85bec79be5f18fb6329d92b45/Example/AGVolumeControlView/Images.xcassets/playButton.imageset/Play-50.png -------------------------------------------------------------------------------- /Example/AGVolumeControlView/Images.xcassets/stopButton.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Stop Filled-50.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/AGVolumeControlView/Images.xcassets/stopButton.imageset/Stop Filled-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agilie/AGVolumeControlView/a31ee85f3b997db85bec79be5f18fb6329d92b45/Example/AGVolumeControlView/Images.xcassets/stopButton.imageset/Stop Filled-50.png -------------------------------------------------------------------------------- /Example/AGVolumeControlView/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 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /Example/AGVolumeControlView/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // AGVolumeControlView 4 | // 5 | // Created by liptugamichael@gmail.com on 06/09/2017. 6 | // Copyright (c) 2017 liptugamichael@gmail.com. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import AVFoundation.AVFAudio 11 | import AGVolumeControlView 12 | 13 | class ViewController: UIViewController { 14 | 15 | @IBOutlet weak var volumeControl: AGVolumeControl! 16 | 17 | @IBOutlet weak var playButton: UIButton! 18 | @IBOutlet weak var stopButton: UIButton! 19 | 20 | fileprivate var audioPlayer: AVAudioPlayer? 21 | fileprivate var levelTimer : Timer? 22 | 23 | override func viewDidLoad() { 24 | super.viewDidLoad() 25 | self.setupViewController() 26 | // Do any additional setup after loading the view, typically from a nib. 27 | } 28 | 29 | override func didReceiveMemoryWarning() { 30 | super.didReceiveMemoryWarning() 31 | // Dispose of any resources that can be recreated. 32 | } 33 | 34 | @IBAction func playButtonDidTouch(_ sender: Any) { 35 | self.startPlay() 36 | } 37 | 38 | @IBAction func stopButtonDidTouch(_ sender: Any) { 39 | self.stopPlay() 40 | } 41 | } 42 | 43 | extension ViewController 44 | { 45 | fileprivate func setupViewController() 46 | { 47 | self.volumeControl.addTarget(self, action: #selector(valueChanged), for: .valueChanged) 48 | 49 | self.configureButton(button: self.playButton, imageName: "playButton") 50 | self.configureButton(button: self.stopButton, imageName: "stopButton") 51 | } 52 | 53 | fileprivate func configureButton (button : UIButton, imageName : String) 54 | { 55 | let image = UIImage(named: imageName)?.withRenderingMode(.alwaysTemplate) 56 | button.setImage(image, for: .normal) 57 | button.tintColor = UIColor.init(red: 117.0/255.0, green: 250.0/255.0, blue: 252.0/255.0, alpha: 1.0) 58 | } 59 | 60 | func valueChanged() { 61 | self.audioPlayer?.volume = Float(self.volumeControl.volumeSliderProgressValue()) 62 | } 63 | 64 | fileprivate func startPlay () 65 | { 66 | guard let audioPath2 = Bundle.main.path(forResource: "YDOM", ofType: "mp3") else { 67 | return 68 | } 69 | do { 70 | self.audioPlayer = try AVAudioPlayer.init(contentsOf: URL.init(fileURLWithPath: audioPath2)) 71 | self.audioPlayer?.isMeteringEnabled = true 72 | self.audioPlayer?.volume = Float(self.volumeControl.volumeSliderProgressValue()) 73 | self.audioPlayer?.prepareToPlay() 74 | self.audioPlayer?.play() 75 | self.configureLevelTimer() 76 | } 77 | catch { 78 | print("Something bad happened. Try catching specific errors to narrow things down") 79 | } 80 | } 81 | 82 | fileprivate func stopPlay() 83 | { 84 | self.audioPlayer?.stop() 85 | self.levelTimer?.invalidate() 86 | self.levelTimer = nil 87 | } 88 | 89 | fileprivate func configureLevelTimer () 90 | { 91 | self.levelTimer = Timer.scheduledTimer( 92 | timeInterval: Double(0.005), 93 | target: self, 94 | selector: #selector(self.levelTimerListener), 95 | userInfo: nil, 96 | repeats: true 97 | ) 98 | } 99 | 100 | func levelTimerListener () 101 | { 102 | self.audioPlayer?.updateMeters() 103 | var level : CGFloat! 104 | let minDecibels: CGFloat = -80 105 | if let decibels = self.audioPlayer?.averagePower(forChannel: 0) 106 | { 107 | if decibels < Float(minDecibels) 108 | { 109 | level = 0 110 | } 111 | else if decibels >= 0 112 | { 113 | level = 1 114 | } 115 | else 116 | { 117 | let root: Float = 2 118 | let minAmp = powf(10, 0.05 * Float(minDecibels)) 119 | let inverseAmpRange: Float = 1 / (1 - minAmp) 120 | let amp = powf(10, 0.05 * decibels) 121 | let adjAmp: Float = (amp - minAmp) * inverseAmpRange 122 | level = CGFloat(powf(adjAmp, 1/root)) 123 | } 124 | 125 | self.volumeControl.updateDecibelsLevel(decibelsLevel: level) 126 | } 127 | } 128 | } 129 | -------------------------------------------------------------------------------- /Example/AGVolumeControlView/YDOM.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agilie/AGVolumeControlView/a31ee85f3b997db85bec79be5f18fb6329d92b45/Example/AGVolumeControlView/YDOM.mp3 -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | use_frameworks! 2 | 3 | target 'AGVolumeControlView_Example' do 4 | pod 'AGVolumeControlView', :path => '../' 5 | 6 | target 'AGVolumeControlView_Tests' do 7 | inherit! :search_paths 8 | 9 | 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - AGVolumeControlView (0.1.0) 3 | 4 | DEPENDENCIES: 5 | - AGVolumeControlView (from `../`) 6 | 7 | EXTERNAL SOURCES: 8 | AGVolumeControlView: 9 | :path: "../" 10 | 11 | SPEC CHECKSUMS: 12 | AGVolumeControlView: 9cf519ad35bc9a1214488bd10804fddd39c26322 13 | 14 | PODFILE CHECKSUM: fd091dedd20f3ff168f1d66a05d8360009b1fab5 15 | 16 | COCOAPODS: 1.2.1 17 | -------------------------------------------------------------------------------- /Example/Pods/Local Podspecs/AGVolumeControlView.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "AGVolumeControlView", 3 | "version": "0.1.0", 4 | "summary": "A short description of AGVolumeControlView.", 5 | "description": "TODO: Add long description of the pod here.", 6 | "homepage": "https://github.com/agilie/AGVolumeControlView", 7 | "license": { 8 | "type": "MIT", 9 | "file": "LICENSE" 10 | }, 11 | "authors": { 12 | "Agilie": "info@agilie.com" 13 | }, 14 | "source": { 15 | "git": "https://github.com/agilie/AGVolumeControlView.git", 16 | "tag": "0.1.0" 17 | }, 18 | "platforms": { 19 | "ios": "8.0" 20 | }, 21 | "source_files": "AGVolumeControlView/Classes/**/*.{swift}", 22 | "frameworks": "UIKit" 23 | } 24 | -------------------------------------------------------------------------------- /Example/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - AGVolumeControlView (0.1.0) 3 | 4 | DEPENDENCIES: 5 | - AGVolumeControlView (from `../`) 6 | 7 | EXTERNAL SOURCES: 8 | AGVolumeControlView: 9 | :path: "../" 10 | 11 | SPEC CHECKSUMS: 12 | AGVolumeControlView: 9cf519ad35bc9a1214488bd10804fddd39c26322 13 | 14 | PODFILE CHECKSUM: fd091dedd20f3ff168f1d66a05d8360009b1fab5 15 | 16 | COCOAPODS: 1.2.1 17 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 0906DF70A494E7F8650FEB98EA8134BF /* AGVolumeControlView-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = B054DA5BD354768A8150C63969376CF8 /* AGVolumeControlView-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 11 | 1E566B4E9F23D399176666A6FC69AE87 /* AGArcStruct.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6C8FCEEE07347ADA9C40D53D3049B20 /* AGArcStruct.swift */; }; 12 | 25952EFF747D6ED4C73692BFA61FAD62 /* Pods-AGVolumeControlView_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = ABF7AF9A3463CCCD5D201FA0F838FEC9 /* Pods-AGVolumeControlView_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 13 | 290831E32DE89FA921E2C12D12103E26 /* AGVolumeControlSlider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C333369C9266164A84F49614F4F68EC /* AGVolumeControlSlider.swift */; }; 14 | 37F511F8307F88AEB661957B319C4B6B /* AGVolumeControlDrawView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA9DAA90ACBE68C00FBB481D53780017 /* AGVolumeControlDrawView.swift */; }; 15 | 472D575D18B9C924CA7E65478100EA2C /* Pods-AGVolumeControlView_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = D6B49821BCE02C3EA06E93F2ED059B83 /* Pods-AGVolumeControlView_Tests-dummy.m */; }; 16 | 4C57AC8AAE6552006A7D771F31B235A2 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D88AAE1F92055A60CC2FC970D7D34634 /* Foundation.framework */; }; 17 | 4D1C284B009F4EF864FDC61A75459018 /* AGVolumeControlGradientBackground.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8065FE8D0FB50CCA0C4EBF9CD02DE269 /* AGVolumeControlGradientBackground.swift */; }; 18 | 56F2894D85A7057999885765698A7679 /* UIColor+AGColoredGradient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2820E0A86D540BD667970B4974AD2CDE /* UIColor+AGColoredGradient.swift */; }; 19 | 66855D84E1AF87F92F32488AE7BB2044 /* Pods-AGVolumeControlView_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 5432060781A28D060A37F122DE64C6A2 /* Pods-AGVolumeControlView_Example-dummy.m */; }; 20 | 7070E4AB0DEA82F911F2359AE6C97490 /* Pods-AGVolumeControlView_Tests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 8AC1B814E4EE6514AE4B65BD3478C6FD /* Pods-AGVolumeControlView_Tests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 21 | 86D2E30E1DB9EE6F50A7228723DACE84 /* AGVolumeControlMathHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = D87637745DCFFF3CB3130EEBD1DAEC53 /* AGVolumeControlMathHelper.swift */; }; 22 | 92A79264EC784E6803B4949CCB553395 /* AGCircleStruct.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD17D5F0C209091A4B086139D699823B /* AGCircleStruct.swift */; }; 23 | B0618794D3BC2AEB16758E8D82F7FE9E /* AGVolumeControlLinearGradientBackground.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DE7B0A0217E486190410478D4F7D677 /* AGVolumeControlLinearGradientBackground.swift */; }; 24 | C720139C0126B203BFC476F0E435B6C3 /* AGVolumeControl.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2343FFF08169732A040C422112CAF6B4 /* AGVolumeControl.swift */; }; 25 | E0CFBB81FB130C9045FF7551D078AC2B /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B63C6A64CF66340668996F78DA6BB482 /* UIKit.framework */; }; 26 | E67EF79E5C3424B7ACA464DBE9D3C981 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D88AAE1F92055A60CC2FC970D7D34634 /* Foundation.framework */; }; 27 | F3D8B17CBD8DFCA5EC8DE24371169991 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D88AAE1F92055A60CC2FC970D7D34634 /* Foundation.framework */; }; 28 | F73F5D56C102C53D4D39327E99398E15 /* AGVolumeControlView-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E7894CC8D82DDE2053796012C5E9821 /* AGVolumeControlView-dummy.m */; }; 29 | F9B0876496D5252967F17DA7B406DBAF /* AGIntervalStruct.swift in Sources */ = {isa = PBXBuildFile; fileRef = 814579BB67A1777158B1524F864B8949 /* AGIntervalStruct.swift */; }; 30 | /* End PBXBuildFile section */ 31 | 32 | /* Begin PBXContainerItemProxy section */ 33 | 431802C5F03FDE52DCC0DF95B60C5E1A /* PBXContainerItemProxy */ = { 34 | isa = PBXContainerItemProxy; 35 | containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 36 | proxyType = 1; 37 | remoteGlobalIDString = 7E8F4080D914C5132EF1832E253E0749; 38 | remoteInfo = AGVolumeControlView; 39 | }; 40 | /* End PBXContainerItemProxy section */ 41 | 42 | /* Begin PBXFileReference section */ 43 | 013DF16A961C65BD434AB8FBF9DFEE57 /* Pods-AGVolumeControlView_Example-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-AGVolumeControlView_Example-resources.sh"; sourceTree = ""; }; 44 | 0E7894CC8D82DDE2053796012C5E9821 /* AGVolumeControlView-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "AGVolumeControlView-dummy.m"; sourceTree = ""; }; 45 | 1CBBFBD291C366B35CFBD0F52A9D92C4 /* Pods-AGVolumeControlView_Tests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-AGVolumeControlView_Tests-frameworks.sh"; sourceTree = ""; }; 46 | 2343FFF08169732A040C422112CAF6B4 /* AGVolumeControl.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AGVolumeControl.swift; sourceTree = ""; }; 47 | 260F12EC03B8E0CEFDA10D91EAF0F00F /* Pods-AGVolumeControlView_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-AGVolumeControlView_Example.release.xcconfig"; sourceTree = ""; }; 48 | 2820E0A86D540BD667970B4974AD2CDE /* UIColor+AGColoredGradient.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIColor+AGColoredGradient.swift"; sourceTree = ""; }; 49 | 29FAAC5BEF1D557694DC6703451C3FC7 /* Pods-AGVolumeControlView_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-AGVolumeControlView_Tests.debug.xcconfig"; sourceTree = ""; }; 50 | 2B3EA8043660E6C853F53FDC3A8C124D /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 51 | 2E7A3AB0E33C4EBC0B0E54A876B0C429 /* Pods_AGVolumeControlView_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_AGVolumeControlView_Tests.framework; path = "Pods-AGVolumeControlView_Tests.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; 52 | 30EAE6FEE4906378C3128BCC9287F852 /* Pods-AGVolumeControlView_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-AGVolumeControlView_Tests.modulemap"; sourceTree = ""; }; 53 | 314E696C110367ABA9D2E9DC2B64EA51 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 54 | 36F96EBFBBCF794B680AB56E5EBAA229 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 55 | 3B1090CCD90660A8D03B5113F9732090 /* Pods_AGVolumeControlView_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_AGVolumeControlView_Example.framework; path = "Pods-AGVolumeControlView_Example.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; 56 | 43CE81797E3EA6E0756A25A6E87A0907 /* Pods-AGVolumeControlView_Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-AGVolumeControlView_Tests-acknowledgements.plist"; sourceTree = ""; }; 57 | 5432060781A28D060A37F122DE64C6A2 /* Pods-AGVolumeControlView_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-AGVolumeControlView_Example-dummy.m"; sourceTree = ""; }; 58 | 5723F0853EFDB74D22F83C33840D30C4 /* Pods-AGVolumeControlView_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-AGVolumeControlView_Example-acknowledgements.markdown"; sourceTree = ""; }; 59 | 5DDCF0E25D9B6DA84A6DFA08B842D86C /* Pods-AGVolumeControlView_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-AGVolumeControlView_Example.modulemap"; sourceTree = ""; }; 60 | 6DE7B0A0217E486190410478D4F7D677 /* AGVolumeControlLinearGradientBackground.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AGVolumeControlLinearGradientBackground.swift; sourceTree = ""; }; 61 | 723A8171C5AFC8BA68D6CED3B8E527BA /* Pods-AGVolumeControlView_Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-AGVolumeControlView_Example-acknowledgements.plist"; sourceTree = ""; }; 62 | 7E7A3889A6C77DF6407E3C239A38F988 /* Pods-AGVolumeControlView_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-AGVolumeControlView_Example-frameworks.sh"; sourceTree = ""; }; 63 | 8065FE8D0FB50CCA0C4EBF9CD02DE269 /* AGVolumeControlGradientBackground.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AGVolumeControlGradientBackground.swift; sourceTree = ""; }; 64 | 814579BB67A1777158B1524F864B8949 /* AGIntervalStruct.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AGIntervalStruct.swift; sourceTree = ""; }; 65 | 8A5E204EB3C8C6D3A98F3242C8F5D2EE /* Pods-AGVolumeControlView_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-AGVolumeControlView_Example.debug.xcconfig"; sourceTree = ""; }; 66 | 8AC1B814E4EE6514AE4B65BD3478C6FD /* Pods-AGVolumeControlView_Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-AGVolumeControlView_Tests-umbrella.h"; sourceTree = ""; }; 67 | 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 68 | 9C333369C9266164A84F49614F4F68EC /* AGVolumeControlSlider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AGVolumeControlSlider.swift; sourceTree = ""; }; 69 | A145FFE3CC77DAD218118D5FA40204BB /* Pods-AGVolumeControlView_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-AGVolumeControlView_Tests-acknowledgements.markdown"; sourceTree = ""; }; 70 | A7D78E2C6D1B93BC974264BFD03F0402 /* Pods-AGVolumeControlView_Tests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-AGVolumeControlView_Tests-resources.sh"; sourceTree = ""; }; 71 | ABF7AF9A3463CCCD5D201FA0F838FEC9 /* Pods-AGVolumeControlView_Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-AGVolumeControlView_Example-umbrella.h"; sourceTree = ""; }; 72 | B054DA5BD354768A8150C63969376CF8 /* AGVolumeControlView-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "AGVolumeControlView-umbrella.h"; sourceTree = ""; }; 73 | B63C6A64CF66340668996F78DA6BB482 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; 74 | B6C8FCEEE07347ADA9C40D53D3049B20 /* AGArcStruct.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AGArcStruct.swift; sourceTree = ""; }; 75 | BECF29E59ED256EA4A87BE726569CE89 /* AGVolumeControlView-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "AGVolumeControlView-prefix.pch"; sourceTree = ""; }; 76 | C05896EEEBFD81EA4070A3FD6ED5DBD3 /* Pods-AGVolumeControlView_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-AGVolumeControlView_Tests.release.xcconfig"; sourceTree = ""; }; 77 | D6B49821BCE02C3EA06E93F2ED059B83 /* Pods-AGVolumeControlView_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-AGVolumeControlView_Tests-dummy.m"; sourceTree = ""; }; 78 | D87637745DCFFF3CB3130EEBD1DAEC53 /* AGVolumeControlMathHelper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AGVolumeControlMathHelper.swift; sourceTree = ""; }; 79 | D88AAE1F92055A60CC2FC970D7D34634 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 80 | DA9DAA90ACBE68C00FBB481D53780017 /* AGVolumeControlDrawView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AGVolumeControlDrawView.swift; sourceTree = ""; }; 81 | E1694EBE564FBCE59590D8EC40D31260 /* AGVolumeControlView.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = AGVolumeControlView.framework; path = AGVolumeControlView.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 82 | E856C771CCC892ADD83930668A157E4F /* AGVolumeControlView.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = AGVolumeControlView.modulemap; sourceTree = ""; }; 83 | FC600B2A1E2C1330E26815AF74BFA9B3 /* AGVolumeControlView.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = AGVolumeControlView.xcconfig; sourceTree = ""; }; 84 | FD17D5F0C209091A4B086139D699823B /* AGCircleStruct.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AGCircleStruct.swift; sourceTree = ""; }; 85 | /* End PBXFileReference section */ 86 | 87 | /* Begin PBXFrameworksBuildPhase section */ 88 | 080A3DA3028ECE830B0E7521CEC29E27 /* Frameworks */ = { 89 | isa = PBXFrameworksBuildPhase; 90 | buildActionMask = 2147483647; 91 | files = ( 92 | 4C57AC8AAE6552006A7D771F31B235A2 /* Foundation.framework in Frameworks */, 93 | E0CFBB81FB130C9045FF7551D078AC2B /* UIKit.framework in Frameworks */, 94 | ); 95 | runOnlyForDeploymentPostprocessing = 0; 96 | }; 97 | 48C6FD75EDD75EF61F3938CB945039E5 /* Frameworks */ = { 98 | isa = PBXFrameworksBuildPhase; 99 | buildActionMask = 2147483647; 100 | files = ( 101 | E67EF79E5C3424B7ACA464DBE9D3C981 /* Foundation.framework in Frameworks */, 102 | ); 103 | runOnlyForDeploymentPostprocessing = 0; 104 | }; 105 | B1EEFC4F54D8BD593A585AD64D403622 /* Frameworks */ = { 106 | isa = PBXFrameworksBuildPhase; 107 | buildActionMask = 2147483647; 108 | files = ( 109 | F3D8B17CBD8DFCA5EC8DE24371169991 /* Foundation.framework in Frameworks */, 110 | ); 111 | runOnlyForDeploymentPostprocessing = 0; 112 | }; 113 | /* End PBXFrameworksBuildPhase section */ 114 | 115 | /* Begin PBXGroup section */ 116 | 1C8A9309BB79D772E47F54C26F30D307 /* Products */ = { 117 | isa = PBXGroup; 118 | children = ( 119 | E1694EBE564FBCE59590D8EC40D31260 /* AGVolumeControlView.framework */, 120 | 3B1090CCD90660A8D03B5113F9732090 /* Pods_AGVolumeControlView_Example.framework */, 121 | 2E7A3AB0E33C4EBC0B0E54A876B0C429 /* Pods_AGVolumeControlView_Tests.framework */, 122 | ); 123 | name = Products; 124 | sourceTree = ""; 125 | }; 126 | 24EB1683057BB58F68DF4C521B4744D4 /* AGVolumeControlView */ = { 127 | isa = PBXGroup; 128 | children = ( 129 | D0B2DA62C64EBA8B210AFFE8962A7C8E /* Classes */, 130 | ); 131 | name = AGVolumeControlView; 132 | path = AGVolumeControlView; 133 | sourceTree = ""; 134 | }; 135 | 433CD3331B6C3787F473C941B61FC68F /* Frameworks */ = { 136 | isa = PBXGroup; 137 | children = ( 138 | 438B396F6B4147076630CAEFE34282C1 /* iOS */, 139 | ); 140 | name = Frameworks; 141 | sourceTree = ""; 142 | }; 143 | 438B396F6B4147076630CAEFE34282C1 /* iOS */ = { 144 | isa = PBXGroup; 145 | children = ( 146 | D88AAE1F92055A60CC2FC970D7D34634 /* Foundation.framework */, 147 | B63C6A64CF66340668996F78DA6BB482 /* UIKit.framework */, 148 | ); 149 | name = iOS; 150 | sourceTree = ""; 151 | }; 152 | 7DB346D0F39D3F0E887471402A8071AB = { 153 | isa = PBXGroup; 154 | children = ( 155 | 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, 156 | F9F606B2FDEEC0D2D069657C15233004 /* Development Pods */, 157 | 433CD3331B6C3787F473C941B61FC68F /* Frameworks */, 158 | 1C8A9309BB79D772E47F54C26F30D307 /* Products */, 159 | E7C62847BCA2D0D86C69E0883C5D133C /* Targets Support Files */, 160 | ); 161 | sourceTree = ""; 162 | }; 163 | 7F4FC96BAADF5B9E60C30F3438CF1DB7 /* Support Files */ = { 164 | isa = PBXGroup; 165 | children = ( 166 | E856C771CCC892ADD83930668A157E4F /* AGVolumeControlView.modulemap */, 167 | FC600B2A1E2C1330E26815AF74BFA9B3 /* AGVolumeControlView.xcconfig */, 168 | 0E7894CC8D82DDE2053796012C5E9821 /* AGVolumeControlView-dummy.m */, 169 | BECF29E59ED256EA4A87BE726569CE89 /* AGVolumeControlView-prefix.pch */, 170 | B054DA5BD354768A8150C63969376CF8 /* AGVolumeControlView-umbrella.h */, 171 | 314E696C110367ABA9D2E9DC2B64EA51 /* Info.plist */, 172 | ); 173 | name = "Support Files"; 174 | path = "Example/Pods/Target Support Files/AGVolumeControlView"; 175 | sourceTree = ""; 176 | }; 177 | A4970E8F97824A00CD6B80A7A3358961 /* Pods-AGVolumeControlView_Example */ = { 178 | isa = PBXGroup; 179 | children = ( 180 | 2B3EA8043660E6C853F53FDC3A8C124D /* Info.plist */, 181 | 5DDCF0E25D9B6DA84A6DFA08B842D86C /* Pods-AGVolumeControlView_Example.modulemap */, 182 | 5723F0853EFDB74D22F83C33840D30C4 /* Pods-AGVolumeControlView_Example-acknowledgements.markdown */, 183 | 723A8171C5AFC8BA68D6CED3B8E527BA /* Pods-AGVolumeControlView_Example-acknowledgements.plist */, 184 | 5432060781A28D060A37F122DE64C6A2 /* Pods-AGVolumeControlView_Example-dummy.m */, 185 | 7E7A3889A6C77DF6407E3C239A38F988 /* Pods-AGVolumeControlView_Example-frameworks.sh */, 186 | 013DF16A961C65BD434AB8FBF9DFEE57 /* Pods-AGVolumeControlView_Example-resources.sh */, 187 | ABF7AF9A3463CCCD5D201FA0F838FEC9 /* Pods-AGVolumeControlView_Example-umbrella.h */, 188 | 8A5E204EB3C8C6D3A98F3242C8F5D2EE /* Pods-AGVolumeControlView_Example.debug.xcconfig */, 189 | 260F12EC03B8E0CEFDA10D91EAF0F00F /* Pods-AGVolumeControlView_Example.release.xcconfig */, 190 | ); 191 | name = "Pods-AGVolumeControlView_Example"; 192 | path = "Target Support Files/Pods-AGVolumeControlView_Example"; 193 | sourceTree = ""; 194 | }; 195 | AF83AB58DF0FF61BE6144C6BEE3E3970 /* AGVolumeControlView */ = { 196 | isa = PBXGroup; 197 | children = ( 198 | 24EB1683057BB58F68DF4C521B4744D4 /* AGVolumeControlView */, 199 | 7F4FC96BAADF5B9E60C30F3438CF1DB7 /* Support Files */, 200 | ); 201 | name = AGVolumeControlView; 202 | path = ../..; 203 | sourceTree = ""; 204 | }; 205 | CD00B25013ED12E70844D32801DF2149 /* Pods-AGVolumeControlView_Tests */ = { 206 | isa = PBXGroup; 207 | children = ( 208 | 36F96EBFBBCF794B680AB56E5EBAA229 /* Info.plist */, 209 | 30EAE6FEE4906378C3128BCC9287F852 /* Pods-AGVolumeControlView_Tests.modulemap */, 210 | A145FFE3CC77DAD218118D5FA40204BB /* Pods-AGVolumeControlView_Tests-acknowledgements.markdown */, 211 | 43CE81797E3EA6E0756A25A6E87A0907 /* Pods-AGVolumeControlView_Tests-acknowledgements.plist */, 212 | D6B49821BCE02C3EA06E93F2ED059B83 /* Pods-AGVolumeControlView_Tests-dummy.m */, 213 | 1CBBFBD291C366B35CFBD0F52A9D92C4 /* Pods-AGVolumeControlView_Tests-frameworks.sh */, 214 | A7D78E2C6D1B93BC974264BFD03F0402 /* Pods-AGVolumeControlView_Tests-resources.sh */, 215 | 8AC1B814E4EE6514AE4B65BD3478C6FD /* Pods-AGVolumeControlView_Tests-umbrella.h */, 216 | 29FAAC5BEF1D557694DC6703451C3FC7 /* Pods-AGVolumeControlView_Tests.debug.xcconfig */, 217 | C05896EEEBFD81EA4070A3FD6ED5DBD3 /* Pods-AGVolumeControlView_Tests.release.xcconfig */, 218 | ); 219 | name = "Pods-AGVolumeControlView_Tests"; 220 | path = "Target Support Files/Pods-AGVolumeControlView_Tests"; 221 | sourceTree = ""; 222 | }; 223 | D0B2DA62C64EBA8B210AFFE8962A7C8E /* Classes */ = { 224 | isa = PBXGroup; 225 | children = ( 226 | B6C8FCEEE07347ADA9C40D53D3049B20 /* AGArcStruct.swift */, 227 | FD17D5F0C209091A4B086139D699823B /* AGCircleStruct.swift */, 228 | 814579BB67A1777158B1524F864B8949 /* AGIntervalStruct.swift */, 229 | 2343FFF08169732A040C422112CAF6B4 /* AGVolumeControl.swift */, 230 | DA9DAA90ACBE68C00FBB481D53780017 /* AGVolumeControlDrawView.swift */, 231 | 8065FE8D0FB50CCA0C4EBF9CD02DE269 /* AGVolumeControlGradientBackground.swift */, 232 | 6DE7B0A0217E486190410478D4F7D677 /* AGVolumeControlLinearGradientBackground.swift */, 233 | D87637745DCFFF3CB3130EEBD1DAEC53 /* AGVolumeControlMathHelper.swift */, 234 | 9C333369C9266164A84F49614F4F68EC /* AGVolumeControlSlider.swift */, 235 | 2820E0A86D540BD667970B4974AD2CDE /* UIColor+AGColoredGradient.swift */, 236 | ); 237 | name = Classes; 238 | path = Classes; 239 | sourceTree = ""; 240 | }; 241 | E7C62847BCA2D0D86C69E0883C5D133C /* Targets Support Files */ = { 242 | isa = PBXGroup; 243 | children = ( 244 | A4970E8F97824A00CD6B80A7A3358961 /* Pods-AGVolumeControlView_Example */, 245 | CD00B25013ED12E70844D32801DF2149 /* Pods-AGVolumeControlView_Tests */, 246 | ); 247 | name = "Targets Support Files"; 248 | sourceTree = ""; 249 | }; 250 | F9F606B2FDEEC0D2D069657C15233004 /* Development Pods */ = { 251 | isa = PBXGroup; 252 | children = ( 253 | AF83AB58DF0FF61BE6144C6BEE3E3970 /* AGVolumeControlView */, 254 | ); 255 | name = "Development Pods"; 256 | sourceTree = ""; 257 | }; 258 | /* End PBXGroup section */ 259 | 260 | /* Begin PBXHeadersBuildPhase section */ 261 | 47547A6FD204BC19F529B317D129078C /* Headers */ = { 262 | isa = PBXHeadersBuildPhase; 263 | buildActionMask = 2147483647; 264 | files = ( 265 | 7070E4AB0DEA82F911F2359AE6C97490 /* Pods-AGVolumeControlView_Tests-umbrella.h in Headers */, 266 | ); 267 | runOnlyForDeploymentPostprocessing = 0; 268 | }; 269 | C32B662361FEFF502D52A89CE6992012 /* Headers */ = { 270 | isa = PBXHeadersBuildPhase; 271 | buildActionMask = 2147483647; 272 | files = ( 273 | 25952EFF747D6ED4C73692BFA61FAD62 /* Pods-AGVolumeControlView_Example-umbrella.h in Headers */, 274 | ); 275 | runOnlyForDeploymentPostprocessing = 0; 276 | }; 277 | FBD0721940FB81943C45F773BD1843C6 /* Headers */ = { 278 | isa = PBXHeadersBuildPhase; 279 | buildActionMask = 2147483647; 280 | files = ( 281 | 0906DF70A494E7F8650FEB98EA8134BF /* AGVolumeControlView-umbrella.h in Headers */, 282 | ); 283 | runOnlyForDeploymentPostprocessing = 0; 284 | }; 285 | /* End PBXHeadersBuildPhase section */ 286 | 287 | /* Begin PBXNativeTarget section */ 288 | 4D1A06287720C050C67A72FFA1E2A98F /* Pods-AGVolumeControlView_Tests */ = { 289 | isa = PBXNativeTarget; 290 | buildConfigurationList = 9865B9E73460AB9354606A5FBA1930A2 /* Build configuration list for PBXNativeTarget "Pods-AGVolumeControlView_Tests" */; 291 | buildPhases = ( 292 | C835BFBB0D708DD066DFBB9446B064A9 /* Sources */, 293 | 48C6FD75EDD75EF61F3938CB945039E5 /* Frameworks */, 294 | 47547A6FD204BC19F529B317D129078C /* Headers */, 295 | ); 296 | buildRules = ( 297 | ); 298 | dependencies = ( 299 | ); 300 | name = "Pods-AGVolumeControlView_Tests"; 301 | productName = "Pods-AGVolumeControlView_Tests"; 302 | productReference = 2E7A3AB0E33C4EBC0B0E54A876B0C429 /* Pods_AGVolumeControlView_Tests.framework */; 303 | productType = "com.apple.product-type.framework"; 304 | }; 305 | 7E8F4080D914C5132EF1832E253E0749 /* AGVolumeControlView */ = { 306 | isa = PBXNativeTarget; 307 | buildConfigurationList = 8E7D2ECF1A50C464335A1D6157242B9A /* Build configuration list for PBXNativeTarget "AGVolumeControlView" */; 308 | buildPhases = ( 309 | A5BC7F6DFF6A77C754295CC1445FCC36 /* Sources */, 310 | 080A3DA3028ECE830B0E7521CEC29E27 /* Frameworks */, 311 | FBD0721940FB81943C45F773BD1843C6 /* Headers */, 312 | ); 313 | buildRules = ( 314 | ); 315 | dependencies = ( 316 | ); 317 | name = AGVolumeControlView; 318 | productName = AGVolumeControlView; 319 | productReference = E1694EBE564FBCE59590D8EC40D31260 /* AGVolumeControlView.framework */; 320 | productType = "com.apple.product-type.framework"; 321 | }; 322 | 8EEFE9A056A225C4069A7B50F0FDDBA0 /* Pods-AGVolumeControlView_Example */ = { 323 | isa = PBXNativeTarget; 324 | buildConfigurationList = 2B48CFAFC7F71BE7B5165CE8D3CD2273 /* Build configuration list for PBXNativeTarget "Pods-AGVolumeControlView_Example" */; 325 | buildPhases = ( 326 | EFE218BA58786489918B9D05ADF754F0 /* Sources */, 327 | B1EEFC4F54D8BD593A585AD64D403622 /* Frameworks */, 328 | C32B662361FEFF502D52A89CE6992012 /* Headers */, 329 | ); 330 | buildRules = ( 331 | ); 332 | dependencies = ( 333 | 753515C528AB5118DAFD44F5436E5CF8 /* PBXTargetDependency */, 334 | ); 335 | name = "Pods-AGVolumeControlView_Example"; 336 | productName = "Pods-AGVolumeControlView_Example"; 337 | productReference = 3B1090CCD90660A8D03B5113F9732090 /* Pods_AGVolumeControlView_Example.framework */; 338 | productType = "com.apple.product-type.framework"; 339 | }; 340 | /* End PBXNativeTarget section */ 341 | 342 | /* Begin PBXProject section */ 343 | D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { 344 | isa = PBXProject; 345 | attributes = { 346 | LastSwiftUpdateCheck = 0830; 347 | LastUpgradeCheck = 0700; 348 | }; 349 | buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; 350 | compatibilityVersion = "Xcode 3.2"; 351 | developmentRegion = English; 352 | hasScannedForEncodings = 0; 353 | knownRegions = ( 354 | en, 355 | ); 356 | mainGroup = 7DB346D0F39D3F0E887471402A8071AB; 357 | productRefGroup = 1C8A9309BB79D772E47F54C26F30D307 /* Products */; 358 | projectDirPath = ""; 359 | projectRoot = ""; 360 | targets = ( 361 | 7E8F4080D914C5132EF1832E253E0749 /* AGVolumeControlView */, 362 | 8EEFE9A056A225C4069A7B50F0FDDBA0 /* Pods-AGVolumeControlView_Example */, 363 | 4D1A06287720C050C67A72FFA1E2A98F /* Pods-AGVolumeControlView_Tests */, 364 | ); 365 | }; 366 | /* End PBXProject section */ 367 | 368 | /* Begin PBXSourcesBuildPhase section */ 369 | A5BC7F6DFF6A77C754295CC1445FCC36 /* Sources */ = { 370 | isa = PBXSourcesBuildPhase; 371 | buildActionMask = 2147483647; 372 | files = ( 373 | 1E566B4E9F23D399176666A6FC69AE87 /* AGArcStruct.swift in Sources */, 374 | 92A79264EC784E6803B4949CCB553395 /* AGCircleStruct.swift in Sources */, 375 | F9B0876496D5252967F17DA7B406DBAF /* AGIntervalStruct.swift in Sources */, 376 | C720139C0126B203BFC476F0E435B6C3 /* AGVolumeControl.swift in Sources */, 377 | 37F511F8307F88AEB661957B319C4B6B /* AGVolumeControlDrawView.swift in Sources */, 378 | 4D1C284B009F4EF864FDC61A75459018 /* AGVolumeControlGradientBackground.swift in Sources */, 379 | B0618794D3BC2AEB16758E8D82F7FE9E /* AGVolumeControlLinearGradientBackground.swift in Sources */, 380 | 86D2E30E1DB9EE6F50A7228723DACE84 /* AGVolumeControlMathHelper.swift in Sources */, 381 | 290831E32DE89FA921E2C12D12103E26 /* AGVolumeControlSlider.swift in Sources */, 382 | F73F5D56C102C53D4D39327E99398E15 /* AGVolumeControlView-dummy.m in Sources */, 383 | 56F2894D85A7057999885765698A7679 /* UIColor+AGColoredGradient.swift in Sources */, 384 | ); 385 | runOnlyForDeploymentPostprocessing = 0; 386 | }; 387 | C835BFBB0D708DD066DFBB9446B064A9 /* Sources */ = { 388 | isa = PBXSourcesBuildPhase; 389 | buildActionMask = 2147483647; 390 | files = ( 391 | 472D575D18B9C924CA7E65478100EA2C /* Pods-AGVolumeControlView_Tests-dummy.m in Sources */, 392 | ); 393 | runOnlyForDeploymentPostprocessing = 0; 394 | }; 395 | EFE218BA58786489918B9D05ADF754F0 /* Sources */ = { 396 | isa = PBXSourcesBuildPhase; 397 | buildActionMask = 2147483647; 398 | files = ( 399 | 66855D84E1AF87F92F32488AE7BB2044 /* Pods-AGVolumeControlView_Example-dummy.m in Sources */, 400 | ); 401 | runOnlyForDeploymentPostprocessing = 0; 402 | }; 403 | /* End PBXSourcesBuildPhase section */ 404 | 405 | /* Begin PBXTargetDependency section */ 406 | 753515C528AB5118DAFD44F5436E5CF8 /* PBXTargetDependency */ = { 407 | isa = PBXTargetDependency; 408 | name = AGVolumeControlView; 409 | target = 7E8F4080D914C5132EF1832E253E0749 /* AGVolumeControlView */; 410 | targetProxy = 431802C5F03FDE52DCC0DF95B60C5E1A /* PBXContainerItemProxy */; 411 | }; 412 | /* End PBXTargetDependency section */ 413 | 414 | /* Begin XCBuildConfiguration section */ 415 | 03F70C292B89019486A9C6FF51FAEF85 /* Release */ = { 416 | isa = XCBuildConfiguration; 417 | baseConfigurationReference = FC600B2A1E2C1330E26815AF74BFA9B3 /* AGVolumeControlView.xcconfig */; 418 | buildSettings = { 419 | CODE_SIGN_IDENTITY = ""; 420 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 421 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 422 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 423 | CURRENT_PROJECT_VERSION = 1; 424 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 425 | DEFINES_MODULE = YES; 426 | DYLIB_COMPATIBILITY_VERSION = 1; 427 | DYLIB_CURRENT_VERSION = 1; 428 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 429 | ENABLE_STRICT_OBJC_MSGSEND = YES; 430 | GCC_NO_COMMON_BLOCKS = YES; 431 | GCC_PREFIX_HEADER = "Target Support Files/AGVolumeControlView/AGVolumeControlView-prefix.pch"; 432 | INFOPLIST_FILE = "Target Support Files/AGVolumeControlView/Info.plist"; 433 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 434 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 435 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 436 | MODULEMAP_FILE = "Target Support Files/AGVolumeControlView/AGVolumeControlView.modulemap"; 437 | MTL_ENABLE_DEBUG_INFO = NO; 438 | PRODUCT_NAME = AGVolumeControlView; 439 | SDKROOT = iphoneos; 440 | SKIP_INSTALL = YES; 441 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 442 | SWIFT_VERSION = 3.0; 443 | TARGETED_DEVICE_FAMILY = "1,2"; 444 | VERSIONING_SYSTEM = "apple-generic"; 445 | VERSION_INFO_PREFIX = ""; 446 | }; 447 | name = Release; 448 | }; 449 | 215F85DC165AB723512190BAEDFDB13D /* Debug */ = { 450 | isa = XCBuildConfiguration; 451 | baseConfigurationReference = 8A5E204EB3C8C6D3A98F3242C8F5D2EE /* Pods-AGVolumeControlView_Example.debug.xcconfig */; 452 | buildSettings = { 453 | CODE_SIGN_IDENTITY = ""; 454 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 455 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 456 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 457 | CURRENT_PROJECT_VERSION = 1; 458 | DEBUG_INFORMATION_FORMAT = dwarf; 459 | DEFINES_MODULE = YES; 460 | DYLIB_COMPATIBILITY_VERSION = 1; 461 | DYLIB_CURRENT_VERSION = 1; 462 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 463 | ENABLE_STRICT_OBJC_MSGSEND = YES; 464 | GCC_NO_COMMON_BLOCKS = YES; 465 | INFOPLIST_FILE = "Target Support Files/Pods-AGVolumeControlView_Example/Info.plist"; 466 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 467 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 468 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 469 | MACH_O_TYPE = staticlib; 470 | MODULEMAP_FILE = "Target Support Files/Pods-AGVolumeControlView_Example/Pods-AGVolumeControlView_Example.modulemap"; 471 | MTL_ENABLE_DEBUG_INFO = YES; 472 | OTHER_LDFLAGS = ""; 473 | OTHER_LIBTOOLFLAGS = ""; 474 | PODS_ROOT = "$(SRCROOT)"; 475 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 476 | PRODUCT_NAME = Pods_AGVolumeControlView_Example; 477 | SDKROOT = iphoneos; 478 | SKIP_INSTALL = YES; 479 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 480 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 481 | SWIFT_VERSION = 3.0; 482 | TARGETED_DEVICE_FAMILY = "1,2"; 483 | VERSIONING_SYSTEM = "apple-generic"; 484 | VERSION_INFO_PREFIX = ""; 485 | }; 486 | name = Debug; 487 | }; 488 | 345CC476DF4A7516DBD2220CF5035FF3 /* Debug */ = { 489 | isa = XCBuildConfiguration; 490 | buildSettings = { 491 | ALWAYS_SEARCH_USER_PATHS = NO; 492 | CLANG_ANALYZER_NONNULL = YES; 493 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES; 494 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 495 | CLANG_CXX_LIBRARY = "libc++"; 496 | CLANG_ENABLE_MODULES = YES; 497 | CLANG_ENABLE_OBJC_ARC = YES; 498 | CLANG_WARN_BOOL_CONVERSION = YES; 499 | CLANG_WARN_CONSTANT_CONVERSION = YES; 500 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; 501 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 502 | CLANG_WARN_EMPTY_BODY = YES; 503 | CLANG_WARN_ENUM_CONVERSION = YES; 504 | CLANG_WARN_INFINITE_RECURSION = YES; 505 | CLANG_WARN_INT_CONVERSION = YES; 506 | CLANG_WARN_OBJC_ROOT_CLASS = YES; 507 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 508 | CLANG_WARN_UNREACHABLE_CODE = YES; 509 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 510 | CODE_SIGNING_REQUIRED = NO; 511 | COPY_PHASE_STRIP = NO; 512 | ENABLE_TESTABILITY = YES; 513 | GCC_C_LANGUAGE_STANDARD = gnu99; 514 | GCC_DYNAMIC_NO_PIC = NO; 515 | GCC_OPTIMIZATION_LEVEL = 0; 516 | GCC_PREPROCESSOR_DEFINITIONS = ( 517 | "POD_CONFIGURATION_DEBUG=1", 518 | "DEBUG=1", 519 | "$(inherited)", 520 | ); 521 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 522 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 523 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 524 | GCC_WARN_UNDECLARED_SELECTOR = YES; 525 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 526 | GCC_WARN_UNUSED_FUNCTION = YES; 527 | GCC_WARN_UNUSED_VARIABLE = YES; 528 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 529 | ONLY_ACTIVE_ARCH = YES; 530 | PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; 531 | STRIP_INSTALLED_PRODUCT = NO; 532 | SYMROOT = "${SRCROOT}/../build"; 533 | }; 534 | name = Debug; 535 | }; 536 | 3FD6A03B2CB30853E242C015ECAD21A7 /* Release */ = { 537 | isa = XCBuildConfiguration; 538 | baseConfigurationReference = C05896EEEBFD81EA4070A3FD6ED5DBD3 /* Pods-AGVolumeControlView_Tests.release.xcconfig */; 539 | buildSettings = { 540 | CODE_SIGN_IDENTITY = ""; 541 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 542 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 543 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 544 | CURRENT_PROJECT_VERSION = 1; 545 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 546 | DEFINES_MODULE = YES; 547 | DYLIB_COMPATIBILITY_VERSION = 1; 548 | DYLIB_CURRENT_VERSION = 1; 549 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 550 | ENABLE_STRICT_OBJC_MSGSEND = YES; 551 | GCC_NO_COMMON_BLOCKS = YES; 552 | INFOPLIST_FILE = "Target Support Files/Pods-AGVolumeControlView_Tests/Info.plist"; 553 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 554 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 555 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 556 | MACH_O_TYPE = staticlib; 557 | MODULEMAP_FILE = "Target Support Files/Pods-AGVolumeControlView_Tests/Pods-AGVolumeControlView_Tests.modulemap"; 558 | MTL_ENABLE_DEBUG_INFO = NO; 559 | OTHER_LDFLAGS = ""; 560 | OTHER_LIBTOOLFLAGS = ""; 561 | PODS_ROOT = "$(SRCROOT)"; 562 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 563 | PRODUCT_NAME = Pods_AGVolumeControlView_Tests; 564 | SDKROOT = iphoneos; 565 | SKIP_INSTALL = YES; 566 | TARGETED_DEVICE_FAMILY = "1,2"; 567 | VERSIONING_SYSTEM = "apple-generic"; 568 | VERSION_INFO_PREFIX = ""; 569 | }; 570 | name = Release; 571 | }; 572 | 6453E11CA4C468C0C186E2FFECE5F94A /* Debug */ = { 573 | isa = XCBuildConfiguration; 574 | baseConfigurationReference = 29FAAC5BEF1D557694DC6703451C3FC7 /* Pods-AGVolumeControlView_Tests.debug.xcconfig */; 575 | buildSettings = { 576 | CODE_SIGN_IDENTITY = ""; 577 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 578 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 579 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 580 | CURRENT_PROJECT_VERSION = 1; 581 | DEBUG_INFORMATION_FORMAT = dwarf; 582 | DEFINES_MODULE = YES; 583 | DYLIB_COMPATIBILITY_VERSION = 1; 584 | DYLIB_CURRENT_VERSION = 1; 585 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 586 | ENABLE_STRICT_OBJC_MSGSEND = YES; 587 | GCC_NO_COMMON_BLOCKS = YES; 588 | INFOPLIST_FILE = "Target Support Files/Pods-AGVolumeControlView_Tests/Info.plist"; 589 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 590 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 591 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 592 | MACH_O_TYPE = staticlib; 593 | MODULEMAP_FILE = "Target Support Files/Pods-AGVolumeControlView_Tests/Pods-AGVolumeControlView_Tests.modulemap"; 594 | MTL_ENABLE_DEBUG_INFO = YES; 595 | OTHER_LDFLAGS = ""; 596 | OTHER_LIBTOOLFLAGS = ""; 597 | PODS_ROOT = "$(SRCROOT)"; 598 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 599 | PRODUCT_NAME = Pods_AGVolumeControlView_Tests; 600 | SDKROOT = iphoneos; 601 | SKIP_INSTALL = YES; 602 | TARGETED_DEVICE_FAMILY = "1,2"; 603 | VERSIONING_SYSTEM = "apple-generic"; 604 | VERSION_INFO_PREFIX = ""; 605 | }; 606 | name = Debug; 607 | }; 608 | 717E77604BFBB04BEAF56608A1CB2EDE /* Release */ = { 609 | isa = XCBuildConfiguration; 610 | buildSettings = { 611 | ALWAYS_SEARCH_USER_PATHS = NO; 612 | CLANG_ANALYZER_NONNULL = YES; 613 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES; 614 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 615 | CLANG_CXX_LIBRARY = "libc++"; 616 | CLANG_ENABLE_MODULES = YES; 617 | CLANG_ENABLE_OBJC_ARC = YES; 618 | CLANG_WARN_BOOL_CONVERSION = YES; 619 | CLANG_WARN_CONSTANT_CONVERSION = YES; 620 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; 621 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 622 | CLANG_WARN_EMPTY_BODY = YES; 623 | CLANG_WARN_ENUM_CONVERSION = YES; 624 | CLANG_WARN_INFINITE_RECURSION = YES; 625 | CLANG_WARN_INT_CONVERSION = YES; 626 | CLANG_WARN_OBJC_ROOT_CLASS = YES; 627 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 628 | CLANG_WARN_UNREACHABLE_CODE = YES; 629 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 630 | CODE_SIGNING_REQUIRED = NO; 631 | COPY_PHASE_STRIP = YES; 632 | ENABLE_NS_ASSERTIONS = NO; 633 | GCC_C_LANGUAGE_STANDARD = gnu99; 634 | GCC_PREPROCESSOR_DEFINITIONS = ( 635 | "POD_CONFIGURATION_RELEASE=1", 636 | "$(inherited)", 637 | ); 638 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 639 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 640 | GCC_WARN_UNDECLARED_SELECTOR = YES; 641 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 642 | GCC_WARN_UNUSED_FUNCTION = YES; 643 | GCC_WARN_UNUSED_VARIABLE = YES; 644 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 645 | PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; 646 | STRIP_INSTALLED_PRODUCT = NO; 647 | SYMROOT = "${SRCROOT}/../build"; 648 | VALIDATE_PRODUCT = YES; 649 | }; 650 | name = Release; 651 | }; 652 | 9B358793E15C240DEF65244A2D6B3537 /* Release */ = { 653 | isa = XCBuildConfiguration; 654 | baseConfigurationReference = 260F12EC03B8E0CEFDA10D91EAF0F00F /* Pods-AGVolumeControlView_Example.release.xcconfig */; 655 | buildSettings = { 656 | CODE_SIGN_IDENTITY = ""; 657 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 658 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 659 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 660 | CURRENT_PROJECT_VERSION = 1; 661 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 662 | DEFINES_MODULE = YES; 663 | DYLIB_COMPATIBILITY_VERSION = 1; 664 | DYLIB_CURRENT_VERSION = 1; 665 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 666 | ENABLE_STRICT_OBJC_MSGSEND = YES; 667 | GCC_NO_COMMON_BLOCKS = YES; 668 | INFOPLIST_FILE = "Target Support Files/Pods-AGVolumeControlView_Example/Info.plist"; 669 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 670 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 671 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 672 | MACH_O_TYPE = staticlib; 673 | MODULEMAP_FILE = "Target Support Files/Pods-AGVolumeControlView_Example/Pods-AGVolumeControlView_Example.modulemap"; 674 | MTL_ENABLE_DEBUG_INFO = NO; 675 | OTHER_LDFLAGS = ""; 676 | OTHER_LIBTOOLFLAGS = ""; 677 | PODS_ROOT = "$(SRCROOT)"; 678 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 679 | PRODUCT_NAME = Pods_AGVolumeControlView_Example; 680 | SDKROOT = iphoneos; 681 | SKIP_INSTALL = YES; 682 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 683 | SWIFT_VERSION = 3.0; 684 | TARGETED_DEVICE_FAMILY = "1,2"; 685 | VERSIONING_SYSTEM = "apple-generic"; 686 | VERSION_INFO_PREFIX = ""; 687 | }; 688 | name = Release; 689 | }; 690 | BA4B15442EACCC086AEA3074777E1C14 /* Debug */ = { 691 | isa = XCBuildConfiguration; 692 | baseConfigurationReference = FC600B2A1E2C1330E26815AF74BFA9B3 /* AGVolumeControlView.xcconfig */; 693 | buildSettings = { 694 | CODE_SIGN_IDENTITY = ""; 695 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 696 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 697 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 698 | CURRENT_PROJECT_VERSION = 1; 699 | DEBUG_INFORMATION_FORMAT = dwarf; 700 | DEFINES_MODULE = YES; 701 | DYLIB_COMPATIBILITY_VERSION = 1; 702 | DYLIB_CURRENT_VERSION = 1; 703 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 704 | ENABLE_STRICT_OBJC_MSGSEND = YES; 705 | GCC_NO_COMMON_BLOCKS = YES; 706 | GCC_PREFIX_HEADER = "Target Support Files/AGVolumeControlView/AGVolumeControlView-prefix.pch"; 707 | INFOPLIST_FILE = "Target Support Files/AGVolumeControlView/Info.plist"; 708 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 709 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 710 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 711 | MODULEMAP_FILE = "Target Support Files/AGVolumeControlView/AGVolumeControlView.modulemap"; 712 | MTL_ENABLE_DEBUG_INFO = YES; 713 | PRODUCT_NAME = AGVolumeControlView; 714 | SDKROOT = iphoneos; 715 | SKIP_INSTALL = YES; 716 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 717 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 718 | SWIFT_VERSION = 3.0; 719 | TARGETED_DEVICE_FAMILY = "1,2"; 720 | VERSIONING_SYSTEM = "apple-generic"; 721 | VERSION_INFO_PREFIX = ""; 722 | }; 723 | name = Debug; 724 | }; 725 | /* End XCBuildConfiguration section */ 726 | 727 | /* Begin XCConfigurationList section */ 728 | 2B48CFAFC7F71BE7B5165CE8D3CD2273 /* Build configuration list for PBXNativeTarget "Pods-AGVolumeControlView_Example" */ = { 729 | isa = XCConfigurationList; 730 | buildConfigurations = ( 731 | 215F85DC165AB723512190BAEDFDB13D /* Debug */, 732 | 9B358793E15C240DEF65244A2D6B3537 /* Release */, 733 | ); 734 | defaultConfigurationIsVisible = 0; 735 | defaultConfigurationName = Release; 736 | }; 737 | 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { 738 | isa = XCConfigurationList; 739 | buildConfigurations = ( 740 | 345CC476DF4A7516DBD2220CF5035FF3 /* Debug */, 741 | 717E77604BFBB04BEAF56608A1CB2EDE /* Release */, 742 | ); 743 | defaultConfigurationIsVisible = 0; 744 | defaultConfigurationName = Release; 745 | }; 746 | 8E7D2ECF1A50C464335A1D6157242B9A /* Build configuration list for PBXNativeTarget "AGVolumeControlView" */ = { 747 | isa = XCConfigurationList; 748 | buildConfigurations = ( 749 | BA4B15442EACCC086AEA3074777E1C14 /* Debug */, 750 | 03F70C292B89019486A9C6FF51FAEF85 /* Release */, 751 | ); 752 | defaultConfigurationIsVisible = 0; 753 | defaultConfigurationName = Release; 754 | }; 755 | 9865B9E73460AB9354606A5FBA1930A2 /* Build configuration list for PBXNativeTarget "Pods-AGVolumeControlView_Tests" */ = { 756 | isa = XCConfigurationList; 757 | buildConfigurations = ( 758 | 6453E11CA4C468C0C186E2FFECE5F94A /* Debug */, 759 | 3FD6A03B2CB30853E242C015ECAD21A7 /* Release */, 760 | ); 761 | defaultConfigurationIsVisible = 0; 762 | defaultConfigurationName = Release; 763 | }; 764 | /* End XCConfigurationList section */ 765 | }; 766 | rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 767 | } 768 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/AGVolumeControlView/AGVolumeControlView-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_AGVolumeControlView : NSObject 3 | @end 4 | @implementation PodsDummy_AGVolumeControlView 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/AGVolumeControlView/AGVolumeControlView-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/AGVolumeControlView/AGVolumeControlView-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double AGVolumeControlViewVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char AGVolumeControlViewVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/AGVolumeControlView/AGVolumeControlView.modulemap: -------------------------------------------------------------------------------- 1 | framework module AGVolumeControlView { 2 | umbrella header "AGVolumeControlView-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/AGVolumeControlView/AGVolumeControlView.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/AGVolumeControlView 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 4 | OTHER_LDFLAGS = -framework "UIKit" 5 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT} 9 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. 10 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | SKIP_INSTALL = YES 12 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/AGVolumeControlView/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 | 0.1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-AGVolumeControlView_Example/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.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-AGVolumeControlView_Example/Pods-AGVolumeControlView_Example-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## AGVolumeControlView 5 | 6 | Copyright (c) 2017 liptugamichael@gmail.com 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. 25 | 26 | Generated by CocoaPods - https://cocoapods.org 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-AGVolumeControlView_Example/Pods-AGVolumeControlView_Example-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Copyright (c) 2017 liptugamichael@gmail.com <liptugamichael@gmail.com> 18 | 19 | Permission is hereby granted, free of charge, to any person obtaining a copy 20 | of this software and associated documentation files (the "Software"), to deal 21 | in the Software without restriction, including without limitation the rights 22 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 23 | copies of the Software, and to permit persons to whom the Software is 24 | furnished to do so, subject to the following conditions: 25 | 26 | The above copyright notice and this permission notice shall be included in 27 | all copies or substantial portions of the Software. 28 | 29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 35 | THE SOFTWARE. 36 | 37 | License 38 | MIT 39 | Title 40 | AGVolumeControlView 41 | Type 42 | PSGroupSpecifier 43 | 44 | 45 | FooterText 46 | Generated by CocoaPods - https://cocoapods.org 47 | Title 48 | 49 | Type 50 | PSGroupSpecifier 51 | 52 | 53 | StringsTable 54 | Acknowledgements 55 | Title 56 | Acknowledgements 57 | 58 | 59 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-AGVolumeControlView_Example/Pods-AGVolumeControlView_Example-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_AGVolumeControlView_Example : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_AGVolumeControlView_Example 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-AGVolumeControlView_Example/Pods-AGVolumeControlView_Example-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 6 | 7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 8 | 9 | install_framework() 10 | { 11 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 12 | local source="${BUILT_PRODUCTS_DIR}/$1" 13 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 14 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 15 | elif [ -r "$1" ]; then 16 | local source="$1" 17 | fi 18 | 19 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 20 | 21 | if [ -L "${source}" ]; then 22 | echo "Symlinked..." 23 | source="$(readlink "${source}")" 24 | fi 25 | 26 | # use filter instead of exclude so missing patterns dont' throw errors 27 | echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 28 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 29 | 30 | local basename 31 | basename="$(basename -s .framework "$1")" 32 | binary="${destination}/${basename}.framework/${basename}" 33 | if ! [ -r "$binary" ]; then 34 | binary="${destination}/${basename}" 35 | fi 36 | 37 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 38 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 39 | strip_invalid_archs "$binary" 40 | fi 41 | 42 | # Resign the code if required by the build settings to avoid unstable apps 43 | code_sign_if_enabled "${destination}/$(basename "$1")" 44 | 45 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 46 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 47 | local swift_runtime_libs 48 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 49 | for lib in $swift_runtime_libs; do 50 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 51 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 52 | code_sign_if_enabled "${destination}/${lib}" 53 | done 54 | fi 55 | } 56 | 57 | # Signs a framework with the provided identity 58 | code_sign_if_enabled() { 59 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 60 | # Use the current code_sign_identitiy 61 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 62 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'" 63 | 64 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 65 | code_sign_cmd="$code_sign_cmd &" 66 | fi 67 | echo "$code_sign_cmd" 68 | eval "$code_sign_cmd" 69 | fi 70 | } 71 | 72 | # Strip invalid architectures 73 | strip_invalid_archs() { 74 | binary="$1" 75 | # Get architectures for current file 76 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" 77 | stripped="" 78 | for arch in $archs; do 79 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then 80 | # Strip non-valid architectures in-place 81 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 82 | stripped="$stripped $arch" 83 | fi 84 | done 85 | if [[ "$stripped" ]]; then 86 | echo "Stripped $binary of architectures:$stripped" 87 | fi 88 | } 89 | 90 | 91 | if [[ "$CONFIGURATION" == "Debug" ]]; then 92 | install_framework "$BUILT_PRODUCTS_DIR/AGVolumeControlView/AGVolumeControlView.framework" 93 | fi 94 | if [[ "$CONFIGURATION" == "Release" ]]; then 95 | install_framework "$BUILT_PRODUCTS_DIR/AGVolumeControlView/AGVolumeControlView.framework" 96 | fi 97 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 98 | wait 99 | fi 100 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-AGVolumeControlView_Example/Pods-AGVolumeControlView_Example-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 5 | 6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 7 | > "$RESOURCES_TO_COPY" 8 | 9 | XCASSET_FILES=() 10 | 11 | case "${TARGETED_DEVICE_FAMILY}" in 12 | 1,2) 13 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 14 | ;; 15 | 1) 16 | TARGET_DEVICE_ARGS="--target-device iphone" 17 | ;; 18 | 2) 19 | TARGET_DEVICE_ARGS="--target-device ipad" 20 | ;; 21 | 3) 22 | TARGET_DEVICE_ARGS="--target-device tv" 23 | ;; 24 | 4) 25 | TARGET_DEVICE_ARGS="--target-device watch" 26 | ;; 27 | *) 28 | TARGET_DEVICE_ARGS="--target-device mac" 29 | ;; 30 | esac 31 | 32 | install_resource() 33 | { 34 | if [[ "$1" = /* ]] ; then 35 | RESOURCE_PATH="$1" 36 | else 37 | RESOURCE_PATH="${PODS_ROOT}/$1" 38 | fi 39 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 40 | cat << EOM 41 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 42 | EOM 43 | exit 1 44 | fi 45 | case $RESOURCE_PATH in 46 | *.storyboard) 47 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" 48 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 49 | ;; 50 | *.xib) 51 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" 52 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 53 | ;; 54 | *.framework) 55 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 56 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 57 | echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 58 | rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 59 | ;; 60 | *.xcdatamodel) 61 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" 62 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 63 | ;; 64 | *.xcdatamodeld) 65 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" 66 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 67 | ;; 68 | *.xcmappingmodel) 69 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" 70 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 71 | ;; 72 | *.xcassets) 73 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 74 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 75 | ;; 76 | *) 77 | echo "$RESOURCE_PATH" 78 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 79 | ;; 80 | esac 81 | } 82 | 83 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 84 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 85 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 86 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 87 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 88 | fi 89 | rm -f "$RESOURCES_TO_COPY" 90 | 91 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 92 | then 93 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 94 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 95 | while read line; do 96 | if [[ $line != "${PODS_ROOT}*" ]]; then 97 | XCASSET_FILES+=("$line") 98 | fi 99 | done <<<"$OTHER_XCASSETS" 100 | 101 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 102 | fi 103 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-AGVolumeControlView_Example/Pods-AGVolumeControlView_Example-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_AGVolumeControlView_ExampleVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_AGVolumeControlView_ExampleVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-AGVolumeControlView_Example/Pods-AGVolumeControlView_Example.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/AGVolumeControlView" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/AGVolumeControlView/AGVolumeControlView.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "AGVolumeControlView" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = $BUILD_DIR 9 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-AGVolumeControlView_Example/Pods-AGVolumeControlView_Example.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_AGVolumeControlView_Example { 2 | umbrella header "Pods-AGVolumeControlView_Example-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-AGVolumeControlView_Example/Pods-AGVolumeControlView_Example.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/AGVolumeControlView" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/AGVolumeControlView/AGVolumeControlView.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "AGVolumeControlView" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = $BUILD_DIR 9 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-AGVolumeControlView_Tests/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.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-AGVolumeControlView_Tests/Pods-AGVolumeControlView_Tests-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | Generated by CocoaPods - https://cocoapods.org 4 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-AGVolumeControlView_Tests/Pods-AGVolumeControlView_Tests-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Generated by CocoaPods - https://cocoapods.org 18 | Title 19 | 20 | Type 21 | PSGroupSpecifier 22 | 23 | 24 | StringsTable 25 | Acknowledgements 26 | Title 27 | Acknowledgements 28 | 29 | 30 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-AGVolumeControlView_Tests/Pods-AGVolumeControlView_Tests-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_AGVolumeControlView_Tests : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_AGVolumeControlView_Tests 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-AGVolumeControlView_Tests/Pods-AGVolumeControlView_Tests-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 6 | 7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 8 | 9 | install_framework() 10 | { 11 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 12 | local source="${BUILT_PRODUCTS_DIR}/$1" 13 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 14 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 15 | elif [ -r "$1" ]; then 16 | local source="$1" 17 | fi 18 | 19 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 20 | 21 | if [ -L "${source}" ]; then 22 | echo "Symlinked..." 23 | source="$(readlink "${source}")" 24 | fi 25 | 26 | # use filter instead of exclude so missing patterns dont' throw errors 27 | echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 28 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 29 | 30 | local basename 31 | basename="$(basename -s .framework "$1")" 32 | binary="${destination}/${basename}.framework/${basename}" 33 | if ! [ -r "$binary" ]; then 34 | binary="${destination}/${basename}" 35 | fi 36 | 37 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 38 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 39 | strip_invalid_archs "$binary" 40 | fi 41 | 42 | # Resign the code if required by the build settings to avoid unstable apps 43 | code_sign_if_enabled "${destination}/$(basename "$1")" 44 | 45 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 46 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 47 | local swift_runtime_libs 48 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 49 | for lib in $swift_runtime_libs; do 50 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 51 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 52 | code_sign_if_enabled "${destination}/${lib}" 53 | done 54 | fi 55 | } 56 | 57 | # Signs a framework with the provided identity 58 | code_sign_if_enabled() { 59 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 60 | # Use the current code_sign_identitiy 61 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 62 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'" 63 | 64 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 65 | code_sign_cmd="$code_sign_cmd &" 66 | fi 67 | echo "$code_sign_cmd" 68 | eval "$code_sign_cmd" 69 | fi 70 | } 71 | 72 | # Strip invalid architectures 73 | strip_invalid_archs() { 74 | binary="$1" 75 | # Get architectures for current file 76 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" 77 | stripped="" 78 | for arch in $archs; do 79 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then 80 | # Strip non-valid architectures in-place 81 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 82 | stripped="$stripped $arch" 83 | fi 84 | done 85 | if [[ "$stripped" ]]; then 86 | echo "Stripped $binary of architectures:$stripped" 87 | fi 88 | } 89 | 90 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 91 | wait 92 | fi 93 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-AGVolumeControlView_Tests/Pods-AGVolumeControlView_Tests-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 5 | 6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 7 | > "$RESOURCES_TO_COPY" 8 | 9 | XCASSET_FILES=() 10 | 11 | case "${TARGETED_DEVICE_FAMILY}" in 12 | 1,2) 13 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 14 | ;; 15 | 1) 16 | TARGET_DEVICE_ARGS="--target-device iphone" 17 | ;; 18 | 2) 19 | TARGET_DEVICE_ARGS="--target-device ipad" 20 | ;; 21 | 3) 22 | TARGET_DEVICE_ARGS="--target-device tv" 23 | ;; 24 | 4) 25 | TARGET_DEVICE_ARGS="--target-device watch" 26 | ;; 27 | *) 28 | TARGET_DEVICE_ARGS="--target-device mac" 29 | ;; 30 | esac 31 | 32 | install_resource() 33 | { 34 | if [[ "$1" = /* ]] ; then 35 | RESOURCE_PATH="$1" 36 | else 37 | RESOURCE_PATH="${PODS_ROOT}/$1" 38 | fi 39 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 40 | cat << EOM 41 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 42 | EOM 43 | exit 1 44 | fi 45 | case $RESOURCE_PATH in 46 | *.storyboard) 47 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" 48 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 49 | ;; 50 | *.xib) 51 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" 52 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 53 | ;; 54 | *.framework) 55 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 56 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 57 | echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 58 | rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 59 | ;; 60 | *.xcdatamodel) 61 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" 62 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 63 | ;; 64 | *.xcdatamodeld) 65 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" 66 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 67 | ;; 68 | *.xcmappingmodel) 69 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" 70 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 71 | ;; 72 | *.xcassets) 73 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 74 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 75 | ;; 76 | *) 77 | echo "$RESOURCE_PATH" 78 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 79 | ;; 80 | esac 81 | } 82 | 83 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 84 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 85 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 86 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 87 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 88 | fi 89 | rm -f "$RESOURCES_TO_COPY" 90 | 91 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 92 | then 93 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 94 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 95 | while read line; do 96 | if [[ $line != "${PODS_ROOT}*" ]]; then 97 | XCASSET_FILES+=("$line") 98 | fi 99 | done <<<"$OTHER_XCASSETS" 100 | 101 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 102 | fi 103 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-AGVolumeControlView_Tests/Pods-AGVolumeControlView_Tests-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_AGVolumeControlView_TestsVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_AGVolumeControlView_TestsVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-AGVolumeControlView_Tests/Pods-AGVolumeControlView_Tests.debug.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/AGVolumeControlView" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/AGVolumeControlView/AGVolumeControlView.framework/Headers" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-AGVolumeControlView_Tests/Pods-AGVolumeControlView_Tests.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_AGVolumeControlView_Tests { 2 | umbrella header "Pods-AGVolumeControlView_Tests-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-AGVolumeControlView_Tests/Pods-AGVolumeControlView_Tests.release.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/AGVolumeControlView" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/AGVolumeControlView/AGVolumeControlView.framework/Headers" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /Example/Tests/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 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Example/Tests/Tests.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import XCTest 3 | import AGVolumeControlView 4 | 5 | class Tests: XCTestCase { 6 | 7 | override func setUp() { 8 | super.setUp() 9 | // Put setup code here. This method is called before the invocation of each test method in the class. 10 | } 11 | 12 | override func tearDown() { 13 | // Put teardown code here. This method is called after the invocation of each test method in the class. 14 | super.tearDown() 15 | } 16 | 17 | func testExample() { 18 | // This is an example of a functional test case. 19 | XCTAssert(true, "Pass") 20 | } 21 | 22 | func testPerformanceExample() { 23 | // This is an example of a performance test case. 24 | self.measure() { 25 | // Put the code you want to measure the time of here. 26 | } 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2017 liptugamichael@gmail.com 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 | AGVolumeControlView 4 |

5 | 6 |

7 | 8 |

9 | 10 |

11 | 12 | 13 | Made by Agilie 14 | 15 | 16 | 17 | CI Status 18 | 19 | 20 | 21 | Version 22 | 23 | 24 | 25 | License 26 | 27 | 28 | 29 | Platform 30 | 31 | 32 |

33 | 34 | 35 | We’re happy to introduce you a new free regulator AGVolumeControlView based on our lightweight open-source visual component that doesn't require extra lines of code and can be easily integrated into your project. 36 | Visual regulator can be connected to a player or other smart house’s device making the process of controlling the level of a particular characteristic much easier. 37 | 38 | ## Link to Android repo 39 | 40 | Check out our Android [VolumeControlView](https://github.com/agilie/VolumeControlView) 41 | 42 | ## Installation 43 | 44 | AGVolumeControlView is available through [CocoaPods](http://cocoapods.org). To install 45 | it, simply add the following line to your Podfile: 46 | 47 | ```ruby 48 | pod "AGVolumeControlView" 49 | ``` 50 | 51 | ## Demo 52 | 53 | VolumeControlView Screenshot VolumeControlView Demo 54 | 55 | ## Example 56 | 57 | To run the example project, clone the repo, and run `pod install` from the Example directory first. 58 | You can also see an example : 59 | 60 | Just bind AGVolumeControl as outlet to your ViewController: 61 | 62 | ````swift 63 | 64 | @IBOutlet weak var volumeControl: AGVolumeControl! 65 | 66 | ```` 67 | 68 | And start playing your control. AGVolumeControl is a regulator of any controllable parameter, such as the volume, brightness, speed, etc. 69 | 70 | ````swift 71 | 72 | self.startPlay() 73 | 74 | ```` 75 | 76 | The visual display of this regulator can be easily customized. One has a possibility to choose colors, the gradient style and background according to the wishes: 77 | 78 | ````swift 79 | 80 | open var thumbRadius: CGFloat 81 | 82 | open var customBackgroundColor : UIColor 83 | 84 | open var volumeControlSliderColor : UIColor 85 | 86 | open var decibelsLevel : CGFloat 87 | 88 | open var hueStart : CGFloat 89 | 90 | open var hueEnd : CGFloat 91 | 92 | open var minimumValue: CGFloat 93 | 94 | open var maximumValue: CGFloat 95 | 96 | open var thumbColor: UIColor 97 | 98 | open var gradientMaskColor: UIColor 99 | ```` 100 | 101 | ## Troubleshooting 102 | Problems? Check the [Issues](https://github.com/agilie/AGVolumeControlView/issues) block 103 | to find the solution or create an new issue that we will fix asap. Feel free to contribute. 104 | 105 | 106 | ## Author 107 | This iOS visual component is open-sourced by [Agilie Team](https://www.agilie.com?utm_source=github&utm_medium=referral&utm_campaign=Git_Swift&utm_term=AGVolumeControlView) 108 | 109 | 110 | ## Contributors 111 | - [Michael Liptuga](https://github.com/Liptuga-Michael) 112 | 113 | 114 | ## Contact us 115 | If you have any questions, suggestions or just need a help with web or mobile development, please email us at 116 | . You can ask us anything from basic to complex questions. 117 | 118 | ## License 119 | 120 | AGVolumeControlView is available under 121 | The [MIT](LICENSE.md) License (MIT) Copyright © 2017 [Agilie Team](https://www.agilie.com?utm_source=github&utm_medium=referral&utm_campaign=Git_Swift&utm_term=AGVolumeControlView) 122 | -------------------------------------------------------------------------------- /_Pods.xcodeproj: -------------------------------------------------------------------------------- 1 | Example/Pods/Pods.xcodeproj --------------------------------------------------------------------------------