10 Commits

Author SHA1 Message Date
Kaunteya Suryawanshi 69676b77c6 Updated podspec to 0.5.1 2016-08-01 00:22:42 +05:30
Kaunteya Suryawanshi a7a84116ed Updated for Swift 3 compatibility changes 2016-07-24 13:02:13 +05:30
Kaunteya Suryawanshi 423936c334 Minor changes 2016-02-12 17:55:52 +05:30
Kaunteya Suryawanshi 7d84b4e697 Merge pull request #4 from schemers/master
Updated access modifiers of IBInspectable to public so as to make them usable outside of IB
2015-11-22 11:49:37 +05:30
Roland Schemers 27cdcf5c53 Update access modifiers to make usable outside of IB
- make all @IBInspectable properties public

- make BaseView init(frame frameRect: NSRect) public
2015-11-21 19:07:44 -08:00
Kaunteya Suryawanshi 0113a09f57 Added badges 2015-11-10 21:47:08 +05:30
Kaunteya Suryawanshi a3b7a4c3bc Alt for image 2015-11-06 23:17:18 +05:30
Kaunteya Suryawanshi b9fef1fb29 Minor changes in README 2015-11-05 22:26:22 +05:30
Kaunteya Suryawanshi 9f7a41e2d8 Updated tag to 0.4.1 2015-11-05 22:21:49 +05:30
Kaunteya Suryawanshi c6b46dcd53 Updated access modifiers 2015-11-05 22:20:23 +05:30
14 changed files with 43 additions and 99 deletions
+4 -4
View File
@@ -11,7 +11,7 @@ import AppKit
@IBDesignable
public class BaseView : NSView {
override init(frame frameRect: NSRect) {
override public init(frame frameRect: NSRect) {
super.init(frame: frameRect)
self.configureLayers()
}
@@ -27,19 +27,19 @@ public class BaseView : NSView {
notifyViewRedesigned()
}
@IBInspectable var background: NSColor = NSColor(red: 88.3 / 256, green: 104.4 / 256, blue: 118.5 / 256, alpha: 1.0) {
@IBInspectable public var background: NSColor = NSColor(red: 88.3 / 256, green: 104.4 / 256, blue: 118.5 / 256, alpha: 1.0) {
didSet {
self.notifyViewRedesigned()
}
}
@IBInspectable var foreground: NSColor = NSColor(red: 66.3 / 256, green: 173.7 / 256, blue: 106.4 / 256, alpha: 1.0) {
@IBInspectable public var foreground: NSColor = NSColor(red: 66.3 / 256, green: 173.7 / 256, blue: 106.4 / 256, alpha: 1.0) {
didSet {
self.notifyViewRedesigned()
}
}
@IBInspectable var cornerRadius: CGFloat = 5.0 {
@IBInspectable public var cornerRadius: CGFloat = 5.0 {
didSet {
self.notifyViewRedesigned()
}
+2 -2
View File
@@ -16,13 +16,13 @@ public class CircularProgressView: DeterminateAnimation {
var progressLayer = CAShapeLayer()
var percentLabelLayer = CATextLayer()
@IBInspectable var strokeWidth: CGFloat = -1 {
@IBInspectable public var strokeWidth: CGFloat = -1 {
didSet {
notifyViewRedesigned()
}
}
@IBInspectable var showPercent: Bool = true {
@IBInspectable public var showPercent: Bool = true {
didSet {
notifyViewRedesigned()
}
+2 -2
View File
@@ -16,10 +16,10 @@ protocol DeterminableAnimation {
@IBDesignable
public class DeterminateAnimation: BaseView, DeterminableAnimation {
@IBInspectable var animated: Bool = true
@IBInspectable public var animated: Bool = true
/// Value of progress now. Range 0..1
@IBInspectable var progress: CGFloat = 0 {
@IBInspectable public var progress: CGFloat = 0 {
didSet {
updateProgress()
}
+1 -1
View File
@@ -15,7 +15,7 @@ public class ProgressBar: DeterminateAnimation {
var borderLayer = CAShapeLayer()
var progressLayer = CAShapeLayer()
@IBInspectable var borderColor: NSColor = NSColor.blackColor() {
@IBInspectable public var borderColor: NSColor = NSColor.blackColor() {
didSet {
notifyViewRedesigned()
}
+1 -1
View File
@@ -15,7 +15,7 @@ private let strokeRange = (start: 0.0, end: 0.8)
@IBDesignable
public class CircularSnail: IndeterminateAnimation {
@IBInspectable var lineWidth: CGFloat = -1 {
@IBInspectable public var lineWidth: CGFloat = -1 {
didSet {
progressLayer.lineWidth = lineWidth
}
+3 -3
View File
@@ -35,12 +35,12 @@ public class Crawler: IndeterminateAnimation {
let rect = self.bounds
let insetRect = NSInsetRect(rect, rect.width * 0.15, rect.width * 0.15)
for var i = 0.0; i < 5; i++ {
for i in 0 ..< 5 {
let starShape = CAShapeLayer()
starList.append(starShape)
starShape.backgroundColor = foreground.CGColor
let circleWidth = smallCircleSize - i * 2
let circleWidth = smallCircleSize - Double(i) * 2
starShape.bounds = CGRect(x: 0, y: 0, width: circleWidth, height: circleWidth)
starShape.cornerRadius = CGFloat(circleWidth / 2)
starShape.position = CGPoint(x: rect.midX, y: rect.midY + insetRect.height / 2)
@@ -52,7 +52,7 @@ public class Crawler: IndeterminateAnimation {
let rotationAnimation = CAKeyframeAnimation(keyPath: "position")
rotationAnimation.path = arcPath.CGPath
rotationAnimation.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseOut)
rotationAnimation.beginTime = (duration * 0.075) * i
rotationAnimation.beginTime = (duration * 0.075) * Double(i)
rotationAnimation.calculationMode = kCAAnimationCubicPaced
let animationGroup = CAAnimationGroup()
+3 -2
View File
@@ -17,15 +17,16 @@ protocol AnimationActivityProtocol {
public class IndeterminateAnimation: BaseView, AnimationActivityProtocol {
/// View is hidden when *animate* property is false
@IBInspectable var displayAfterAnimationEnds: Bool = false
@IBInspectable public var displayAfterAnimationEnds: Bool = false
/**
Control point for all Indeterminate animation
True invokes `startAnimation()` on subclass of IndeterminateAnimation
False invokes `stopAnimation()` on subclass of IndeterminateAnimation
*/
var animate: Bool = false {
public var animate: Bool = false {
didSet {
guard animate != oldValue else { return }
if animate {
self.hidden = false
startAnimation()
+1 -1
View File
@@ -12,7 +12,7 @@ import Cocoa
@IBDesignable
public class Rainbow: CircularSnail {
@IBInspectable var onLightOffDark: Bool = false
@IBInspectable public var onLightOffDark: Bool = false
override func configureLayers() {
super.configureLayers()
+3 -3
View File
@@ -17,19 +17,19 @@ public class RotatingArc: IndeterminateAnimation {
var backgroundCircle = CAShapeLayer()
var arcLayer = CAShapeLayer()
@IBInspectable var strokeWidth: CGFloat = 5 {
@IBInspectable public var strokeWidth: CGFloat = 5 {
didSet {
notifyViewRedesigned()
}
}
@IBInspectable var arcLength: Int = 35 {
@IBInspectable public var arcLength: Int = 35 {
didSet {
notifyViewRedesigned()
}
}
@IBInspectable var clockWise: Bool = true {
@IBInspectable public var clockWise: Bool = true {
didSet {
notifyViewRedesigned()
}
+9 -8
View File
@@ -23,38 +23,38 @@ public class Spinner: IndeterminateAnimation {
return animation
}()
@IBInspectable var starSize:CGSize = CGSize(width: 6, height: 15) {
@IBInspectable public var starSize:CGSize = CGSize(width: 6, height: 15) {
didSet {
notifyViewRedesigned()
}
}
@IBInspectable var roundedCorners: Bool = true {
@IBInspectable public var roundedCorners: Bool = true {
didSet {
notifyViewRedesigned()
}
}
@IBInspectable var distance: CGFloat = CGFloat(20) {
@IBInspectable public var distance: CGFloat = CGFloat(20) {
didSet {
notifyViewRedesigned()
}
}
@IBInspectable var starCount: Int = 10 {
@IBInspectable public var starCount: Int = 10 {
didSet {
notifyViewRedesigned()
}
}
@IBInspectable var duration: Double = 1 {
@IBInspectable public var duration: Double = 1 {
didSet {
animation.duration = duration
}
}
@IBInspectable var clockwise: Bool = false {
@IBInspectable public var clockwise: Bool = false {
didSet {
notifyViewRedesigned()
}
@@ -75,8 +75,8 @@ public class Spinner: IndeterminateAnimation {
starList.removeAll(keepCapacity: true)
containerLayer.sublayers = nil
animation.values = [Double]()
for var i = 0.0; i < 360; i = i + Double(360 / starCount) {
var i = 0.0
while i < 360 {
var iRadian = CGFloat(i * M_PI / 180.0)
if clockwise { iRadian = -iRadian }
@@ -100,6 +100,7 @@ public class Spinner: IndeterminateAnimation {
starShape.opacity = Float(360 - i) / 360
containerLayer.addSublayer(starShape)
starList.append(starShape)
i = i + Double(360 / starCount)
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
Pod::Spec.new do |spec|
spec.name = 'ProgressKit'
spec.version = '0.4.0'
spec.version = '0.5.1'
spec.license = 'MIT'
spec.summary = 'Animated ProgressViews for OS X'
spec.homepage = 'https://github.com/kaunteya/ProgressKit'
+2 -62
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="8191" systemVersion="15A284" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="B8D-0N-5wS">
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15G31" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="B8D-0N-5wS">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="8191"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="10117"/>
</dependencies>
<scenes>
<!--Application-->
@@ -674,7 +674,6 @@
<tabView key="tabView" focusRingType="none" type="noTabsNoBorder" id="nfr-Au-q0a">
<rect key="frame" x="0.0" y="0.0" width="321" height="113"/>
<autoresizingMask key="autoresizingMask"/>
<animations/>
<font key="font" metaFont="message"/>
<tabViewItems/>
</tabView>
@@ -697,11 +696,9 @@
<subviews>
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="qjG-BT-qLK" customClass="CircularSnail" customModule="ProgressKit" customModuleProvider="target">
<rect key="frame" x="20" y="84" width="80" height="80"/>
<animations/>
</customView>
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="8Ph-2H-wiR">
<rect key="frame" x="59" y="59" width="41" height="17"/>
<animations/>
<buttonCell key="cell" type="inline" title="More" bezelStyle="inline" alignment="center" borderStyle="border" inset="2" id="lBv-3R-Zg0">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="smallSystemBold"/>
@@ -712,7 +709,6 @@
</button>
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="3VR-oT-y2I" customClass="Spinner" customModule="ProgressKit" customModuleProvider="target">
<rect key="frame" x="250" y="84" width="80" height="80"/>
<animations/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="size" keyPath="starSize">
<size key="value" width="7" height="14"/>
@@ -725,14 +721,12 @@
</customView>
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="haM-Vg-aIY" customClass="Crawler" customModule="ProgressKit" customModuleProvider="target">
<rect key="frame" x="129" y="84" width="80" height="80"/>
<animations/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="boolean" keyPath="displayAfterAnimationEnds" value="YES"/>
</userDefinedRuntimeAttributes>
</customView>
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Npu-8G-HkC">
<rect key="frame" x="168" y="59" width="41" height="17"/>
<animations/>
<buttonCell key="cell" type="inline" title="More" bezelStyle="inline" alignment="center" borderStyle="border" inset="2" id="SqX-Fr-AwH">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="smallSystemBold"/>
@@ -743,7 +737,6 @@
</button>
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="kmB-H3-AT2" customClass="ShootingStars" customModule="ProgressKit" customModuleProvider="target">
<rect key="frame" x="20" y="34" width="438" height="3"/>
<animations/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="foreground">
<color key="value" white="1" alpha="1" colorSpace="calibratedWhite"/>
@@ -758,7 +751,6 @@
<shadow key="shadow" blurRadius="1">
<color key="color" red="0.25490197539329529" green="0.63529413938522339" blue="0.87058824300765991" alpha="1" colorSpace="calibratedRGB"/>
</shadow>
<animations/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="foreground">
<color key="value" white="1" alpha="1" colorSpace="calibratedWhite"/>
@@ -773,7 +765,6 @@
</customView>
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Q8N-1B-PXN">
<rect key="frame" x="289" y="59" width="41" height="17"/>
<animations/>
<buttonCell key="cell" type="inline" title="More" bezelStyle="inline" alignment="center" controlSize="small" borderStyle="border" inset="2" id="Z8O-Rd-zkL">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="smallSystemBold"/>
@@ -784,7 +775,6 @@
</button>
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="vs0-Bp-9Zv">
<rect key="frame" x="422" y="59" width="41" height="17"/>
<animations/>
<buttonCell key="cell" type="inline" title="More" bezelStyle="inline" alignment="center" controlSize="small" borderStyle="border" inset="2" id="zgh-wl-Oer">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="smallSystemBold"/>
@@ -795,10 +785,8 @@
</button>
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="lR0-9k-CEu" customClass="RotatingArc" customModule="ProgressKit" customModuleProvider="target">
<rect key="frame" x="378" y="84" width="80" height="80"/>
<animations/>
</customView>
</subviews>
<animations/>
</view>
</viewController>
<customObject id="lcO-Gc-g97" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
@@ -815,7 +803,6 @@
<subviews>
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="kmw-BV-WIW" customClass="RotatingArc" customModule="ProgressKit" customModuleProvider="target">
<rect key="frame" x="14" y="126" width="80" height="80"/>
<animations/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="strokeWidth">
<real key="value" value="9"/>
@@ -827,7 +814,6 @@
</customView>
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="BN1-ct-TGA" customClass="RotatingArc" customModule="ProgressKit" customModuleProvider="target">
<rect key="frame" x="215" y="126" width="80" height="80"/>
<animations/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="arcLength">
<integer key="value" value="75"/>
@@ -839,7 +825,6 @@
</customView>
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="IUA-cq-CIL" customClass="RotatingArc" customModule="ProgressKit" customModuleProvider="target">
<rect key="frame" x="20" y="31" width="80" height="80"/>
<animations/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="boolean" keyPath="clockWise" value="NO"/>
<userDefinedRuntimeAttribute type="number" keyPath="arcLength">
@@ -849,7 +834,6 @@
</customView>
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="hgU-aF-axh" customClass="RotatingArc" customModule="ProgressKit" customModuleProvider="target">
<rect key="frame" x="113" y="126" width="80" height="80"/>
<animations/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="background">
<color key="value" red="0.1647058874" green="0.65882354970000001" blue="0.53333336109999996" alpha="0.0" colorSpace="calibratedRGB"/>
@@ -864,7 +848,6 @@
</customView>
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="qTF-Fa-o4i" customClass="RotatingArc" customModule="ProgressKit" customModuleProvider="target">
<rect key="frame" x="20" y="31" width="80" height="80"/>
<animations/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="background">
<color key="value" red="0.0" green="0.23137255012989044" blue="0.51372551918029785" alpha="0.0" colorSpace="calibratedRGB"/>
@@ -877,7 +860,6 @@
</customView>
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="gqN-0P-V6h" customClass="RotatingArc" customModule="ProgressKit" customModuleProvider="target">
<rect key="frame" x="128" y="30" width="80" height="80"/>
<animations/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="background">
<color key="value" red="0.0" green="0.23137255012989044" blue="0.51372551918029785" alpha="0.0" colorSpace="calibratedRGB"/>
@@ -889,7 +871,6 @@
</customView>
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="swG-XB-dD9" customClass="RotatingArc" customModule="ProgressKit" customModuleProvider="target">
<rect key="frame" x="121" y="23" width="95" height="95"/>
<animations/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="background">
<color key="value" red="0.0" green="0.23137255009999999" blue="0.51372551919999998" alpha="0.0" colorSpace="calibratedRGB"/>
@@ -904,7 +885,6 @@
</customView>
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="8WU-rT-wd5" customClass="RotatingArc" customModule="ProgressKit" customModuleProvider="target">
<rect key="frame" x="138" y="40" width="60" height="60"/>
<animations/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="background">
<color key="value" red="0.0" green="0.23137255009999999" blue="0.51372551919999998" alpha="0.0" colorSpace="calibratedRGB"/>
@@ -919,7 +899,6 @@
</customView>
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="bfz-P2-8sn" customClass="RotatingArc" customModule="ProgressKit" customModuleProvider="target">
<rect key="frame" x="224" y="30" width="80" height="80"/>
<animations/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="background">
<color key="value" red="0.47450980544090271" green="0.23529411852359772" blue="0.46666666865348816" alpha="0.0" colorSpace="calibratedRGB"/>
@@ -937,7 +916,6 @@
</customView>
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="j2W-FJ-v1G" customClass="RotatingArc" customModule="ProgressKit" customModuleProvider="target">
<rect key="frame" x="229" y="35" width="70" height="70"/>
<animations/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="background">
<color key="value" red="0.47450980539999998" green="0.23529411850000001" blue="0.46666666870000001" alpha="0.0" colorSpace="calibratedRGB"/>
@@ -952,7 +930,6 @@
</customView>
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="bgf-hY-ZRh" customClass="RotatingArc" customModule="ProgressKit" customModuleProvider="target">
<rect key="frame" x="234" y="40" width="60" height="60"/>
<animations/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="background">
<color key="value" red="0.47450980539999998" green="0.23529411850000001" blue="0.46666666870000001" alpha="0.0" colorSpace="calibratedRGB"/>
@@ -970,7 +947,6 @@
</customView>
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="RtF-Gh-lRq" customClass="RotatingArc" customModule="ProgressKit" customModuleProvider="target">
<rect key="frame" x="239" y="45" width="50" height="50"/>
<animations/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="background">
<color key="value" red="0.47450980539999998" green="0.23529411850000001" blue="0.46666666870000001" alpha="0.0" colorSpace="calibratedRGB"/>
@@ -987,7 +963,6 @@
</userDefinedRuntimeAttributes>
</customView>
</subviews>
<animations/>
</view>
</viewController>
<customObject id="Aep-y6-iJb" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
@@ -1004,7 +979,6 @@
<subviews>
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Qkh-Jc-Yju" customClass="CircularSnail" customModule="ProgressKit" customModuleProvider="target">
<rect key="frame" x="20" y="80" width="80" height="80"/>
<animations/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="background">
<color key="value" red="0.93725490570068359" green="0.92941176891326904" blue="0.92156863212585449" alpha="0.0" colorSpace="calibratedRGB"/>
@@ -1016,7 +990,6 @@
</customView>
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="lq1-2r-OsR" customClass="CircularSnail" customModule="ProgressKit" customModuleProvider="target">
<rect key="frame" x="235" y="80" width="80" height="80"/>
<animations/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="background">
<color key="value" red="0.13725490868091583" green="0.49019607901573181" blue="0.81568628549575806" alpha="0.57000000000000006" colorSpace="calibratedRGB"/>
@@ -1034,7 +1007,6 @@
</customView>
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Zv2-cL-kGS" customClass="CircularSnail" customModule="ProgressKit" customModuleProvider="target">
<rect key="frame" x="370" y="102" width="40" height="40"/>
<animations/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="background">
<color key="value" red="0.13725490868091583" green="0.49019607901573181" blue="0.81568628549575806" alpha="0.0" colorSpace="calibratedRGB"/>
@@ -1049,7 +1021,6 @@
</customView>
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="BCf-PU-fcx" customClass="CircularSnail" customModule="ProgressKit" customModuleProvider="target">
<rect key="frame" x="123" y="80" width="80" height="80"/>
<animations/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<real key="value" value="40"/>
@@ -1058,11 +1029,9 @@
</customView>
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Rp1-na-hhA" customClass="Rainbow" customModule="ProgressKit" customModuleProvider="target">
<rect key="frame" x="20" y="0.0" width="80" height="80"/>
<animations/>
</customView>
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Gyx-mO-3Yh" customClass="Rainbow" customModule="ProgressKit" customModuleProvider="target">
<rect key="frame" x="123" y="0.0" width="80" height="80"/>
<animations/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="boolean" keyPath="onLightOffDark" value="YES"/>
<userDefinedRuntimeAttribute type="number" keyPath="lineWidth">
@@ -1071,7 +1040,6 @@
</userDefinedRuntimeAttributes>
</customView>
</subviews>
<animations/>
</view>
</viewController>
<customObject id="qek-pA-X3K" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
@@ -1088,7 +1056,6 @@
<subviews>
<slider verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="vwx-DU-bI3">
<rect key="frame" x="136" y="264" width="289" height="20"/>
<animations/>
<sliderCell key="cell" continuous="YES" state="on" alignment="left" maxValue="1" doubleValue="0.29999999999999999" tickMarkPosition="above" sliderType="linear" id="kV7-A8-t5m"/>
<connections>
<action selector="sliderDragged:" target="XfG-lQ-9wD" id="mes-ql-pK5"/>
@@ -1096,7 +1063,6 @@
</slider>
<button fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="p9y-Jj-cPs">
<rect key="frame" x="18" y="266" width="106" height="18"/>
<animations/>
<buttonCell key="cell" type="check" title="Live Progress" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="Pp0-aX-cfK">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="system"/>
@@ -1107,7 +1073,6 @@
</button>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="0tx-N3-gG1">
<rect key="frame" x="437" y="265" width="45" height="17"/>
<animations/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="100 %" id="7Nr-gz-yTj">
<font key="font" metaFont="system"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@@ -1119,7 +1084,6 @@
</textField>
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="fRz-hN-yoj" customClass="ProgressBar" customModule="ProgressKit" customModuleProvider="target">
<rect key="frame" x="26" y="45" width="454" height="9"/>
<animations/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="foreground">
<color key="value" red="0.29411765933036804" green="0.22352941334247589" blue="0.5372549295425415" alpha="1" colorSpace="calibratedRGB"/>
@@ -1134,7 +1098,6 @@
</customView>
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ejA-gs-jO8" customClass="ProgressBar" customModule="ProgressKit" customModuleProvider="target">
<rect key="frame" x="26" y="91" width="454" height="15"/>
<animations/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="progress">
<real key="value" value="0.34999999999999998"/>
@@ -1143,7 +1106,6 @@
</customView>
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="dYN-D7-hBy" customClass="CircularProgressView" customModule="ProgressKit" customModuleProvider="target">
<rect key="frame" x="26" y="132" width="101" height="101"/>
<animations/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="progress">
<real key="value" value="0.40999999999999998"/>
@@ -1152,7 +1114,6 @@
</customView>
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="S81-p1-vGt" customClass="CircularProgressView" customModule="ProgressKit" customModuleProvider="target">
<rect key="frame" x="171" y="150" width="64" height="64"/>
<animations/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="background">
<color key="value" red="0.83921569585800171" green="0.44705882668495178" blue="0.43921568989753723" alpha="1" colorSpace="calibratedRGB"/>
@@ -1170,7 +1131,6 @@
</customView>
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Bbh-Em-IM9" customClass="CircularProgressView" customModule="ProgressKit" customModuleProvider="target">
<rect key="frame" x="265" y="132" width="101" height="101"/>
<animations/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="background">
<color key="value" white="1" alpha="0.0" colorSpace="calibratedWhite"/>
@@ -1189,7 +1149,6 @@
</customView>
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="4q2-PV-rE0" customClass="ProgressBar" customModule="ProgressKit" customModuleProvider="target">
<rect key="frame" x="26" y="67" width="454" height="11"/>
<animations/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="progress">
<real key="value" value="0.80000000000000004"/>
@@ -1206,7 +1165,6 @@
</userDefinedRuntimeAttributes>
</customView>
</subviews>
<animations/>
</view>
<connections>
<outlet property="slider" destination="vwx-DU-bI3" id="esn-lC-yUN"/>
@@ -1226,7 +1184,6 @@
<subviews>
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="X2k-vb-sC9" customClass="Spinner" customModule="ProgressKit" customModuleProvider="target">
<rect key="frame" x="20" y="122" width="56" height="56"/>
<animations/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="size" keyPath="starSize">
<size key="value" width="7" height="7"/>
@@ -1238,7 +1195,6 @@
</customView>
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="EOH-IG-9v8" customClass="Spinner" customModule="ProgressKit" customModuleProvider="target">
<rect key="frame" x="103" y="117" width="67" height="67"/>
<animations/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="size" keyPath="starSize">
<size key="value" width="3" height="13"/>
@@ -1254,7 +1210,6 @@
</customView>
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="xbE-4t-MsT" customClass="Spinner" customModule="ProgressKit" customModuleProvider="target">
<rect key="frame" x="198" y="98" width="87" height="87"/>
<animations/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="size" keyPath="starSize">
<size key="value" width="8" height="8"/>
@@ -1272,7 +1227,6 @@
</customView>
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="4re-h9-0B8" customClass="Spinner" customModule="ProgressKit" customModuleProvider="target">
<rect key="frame" x="324" y="98" width="87" height="87"/>
<animations/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="size" keyPath="starSize">
<size key="value" width="8" height="8"/>
@@ -1291,7 +1245,6 @@
</customView>
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="cxV-XU-BMs" customClass="Spinner" customModule="ProgressKit" customModuleProvider="target">
<rect key="frame" x="324" y="98" width="87" height="87"/>
<animations/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="size" keyPath="starSize">
<size key="value" width="8" height="8"/>
@@ -1310,7 +1263,6 @@
</customView>
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="LQW-TQ-ZTf" customClass="Spinner" customModule="ProgressKit" customModuleProvider="target">
<rect key="frame" x="198" y="13" width="87" height="87"/>
<animations/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="size" keyPath="starSize">
<size key="value" width="8" height="8"/>
@@ -1332,7 +1284,6 @@
</customView>
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="qCX-xw-cn0" customClass="Spinner" customModule="ProgressKit" customModuleProvider="target">
<rect key="frame" x="198" y="13" width="87" height="87"/>
<animations/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="size" keyPath="starSize">
<size key="value" width="7" height="7"/>
@@ -1354,11 +1305,9 @@
</customView>
<progressIndicator horizontalHuggingPriority="750" verticalHuggingPriority="750" fixedFrame="YES" maxValue="100" bezeled="NO" indeterminate="YES" controlSize="small" style="spinning" translatesAutoresizingMaskIntoConstraints="NO" id="rV6-J2-9Jn">
<rect key="frame" x="20" y="48" width="16" height="16"/>
<animations/>
</progressIndicator>
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="M0A-06-Wvu" customClass="Spinner" customModule="ProgressKit" customModuleProvider="target">
<rect key="frame" x="103" y="23" width="67" height="67"/>
<animations/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="size" keyPath="starSize">
<size key="value" width="9" height="6"/>
@@ -1380,7 +1329,6 @@
</customView>
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="cRc-hQ-H17" customClass="Spinner" customModule="ProgressKit" customModuleProvider="target">
<rect key="frame" x="339" y="28" width="56" height="56"/>
<animations/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="size" keyPath="starSize">
<size key="value" width="7" height="7"/>
@@ -1395,7 +1343,6 @@
</customView>
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="sop-qz-vfQ" customClass="Spinner" customModule="ProgressKit" customModuleProvider="target">
<rect key="frame" x="58" y="48" width="18" height="18"/>
<animations/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="size" keyPath="starSize">
<size key="value" width="2" height="4"/>
@@ -1416,7 +1363,6 @@
</userDefinedRuntimeAttributes>
</customView>
</subviews>
<animations/>
</view>
</viewController>
<customObject id="aXo-xa-gLk" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
@@ -1433,7 +1379,6 @@
<subviews>
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="4ZV-ge-io4" customClass="Crawler" customModule="ProgressKit" customModuleProvider="target">
<rect key="frame" x="12" y="17" width="70" height="70"/>
<animations/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="background">
<color key="value" red="0.96470588445663452" green="0.48627451062202454" blue="0.0" alpha="0.0" colorSpace="calibratedRGB"/>
@@ -1445,7 +1390,6 @@
</customView>
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="mje-ex-whw" customClass="Crawler" customModule="ProgressKit" customModuleProvider="target">
<rect key="frame" x="105" y="17" width="70" height="70"/>
<animations/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<real key="value" value="35"/>
@@ -1454,7 +1398,6 @@
</customView>
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="C1d-xS-5EM" customClass="Crawler" customModule="ProgressKit" customModuleProvider="target">
<rect key="frame" x="193" y="17" width="70" height="70"/>
<animations/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="background">
<color key="value" red="0.76862746477127075" green="0.25882354378700256" blue="0.27058824896812439" alpha="1" colorSpace="calibratedRGB"/>
@@ -1466,7 +1409,6 @@
</customView>
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="5mj-vA-VO1" customClass="Crawler" customModule="ProgressKit" customModuleProvider="target">
<rect key="frame" x="284" y="17" width="70" height="70"/>
<animations/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="background">
<color key="value" white="0.1178155164969595" alpha="0.65000000000000002" colorSpace="calibratedWhite"/>
@@ -1478,7 +1420,6 @@
</customView>
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="GLF-fC-Weh" customClass="Crawler" customModule="ProgressKit" customModuleProvider="target">
<rect key="frame" x="369" y="17" width="70" height="70"/>
<animations/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="background">
<color key="value" red="0.46666666865348816" green="0.7137255072593689" blue="0.94901961088180542" alpha="1" colorSpace="calibratedRGB"/>
@@ -1489,7 +1430,6 @@
</userDefinedRuntimeAttributes>
</customView>
</subviews>
<animations/>
</view>
</viewController>
<customObject id="puf-Qu-TvG" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
+2 -6
View File
@@ -13,17 +13,13 @@ class InDeterminateViewController: NSViewController {
override func viewDidAppear() {
for view in self.view.subviews {
if view is IndeterminateAnimation {
(view as! IndeterminateAnimation).animate = true
}
(view as? IndeterminateAnimation)?.animate = true
}
}
override func viewWillDisappear() {
for view in self.view.subviews {
if view is IndeterminateAnimation {
(view as! IndeterminateAnimation).animate = false
}
(view as? IndeterminateAnimation)?.animate = false
}
}
}
+9 -3
View File
@@ -1,8 +1,14 @@
![Image](/Images/banner.gif)
![ProgressKit Banner](/Images/banner.gif)
[![Cocoapods Compatible](https://img.shields.io/cocoapods/v/ProgressKit.svg)](https://img.shields.io/cocoapods/v/ProgressKit.svg)
[![Platform](https://img.shields.io/cocoapods/p/ProgressKit.svg?style=flat)](http://cocoadocs.org/docsets/ProgressKit)
[![License](https://img.shields.io/cocoapods/l/ProgressKit.svg?style=flat)](http://cocoadocs.org/docsets/ProgressKit)
`ProgressKit` has set of cool `IBDesignable` progress views, with huge customisation options.
You can now make spinners, progress bar, crawlers etc, which nicely gets integrated according to your app theme.
You can now make spinners, progress bar, crawlers etc, which can be finely customised according to your app palette.
# Contents
- [Installation](#installation)
@@ -43,7 +49,7 @@ $ pod install
- Set the size such that width and height are equal
- Drag `IBOutlet` to View Controller
- For `Indeterminate` Progress Views
- Set `Boolean` value to `view.animate`
- Set `true / false` to `view.animate`
- For `Determinate` Progress Views:
- Set `view.progress` to value in `0...1`