4 Commits

Author SHA1 Message Date
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
9 changed files with 26 additions and 20 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()
}
+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
}
+1 -1
View File
@@ -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
+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()
}
+6 -6
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()
}
+7 -1
View File
@@ -1,5 +1,11 @@
![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 can be finely customised according to your app palette.