Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7d84b4e697 | |||
| 27cdcf5c53 | |||
| 0113a09f57 | |||
| a3b7a4c3bc |
+4
-4
@@ -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()
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ 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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
|
||||

|
||||

|
||||
|
||||
[](https://img.shields.io/cocoapods/v/ProgressKit.svg)
|
||||
[](http://cocoadocs.org/docsets/ProgressKit)
|
||||
[](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 can be finely customised according to your app palette.
|
||||
|
||||
Reference in New Issue
Block a user