7 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
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
11 changed files with 32 additions and 26 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
}
+2 -2
View File
@@ -17,14 +17,14 @@ 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 {
if animate {
self.hidden = false
+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()
}
+1 -1
View File
@@ -1,6 +1,6 @@
Pod::Spec.new do |spec|
spec.name = 'ProgressKit'
spec.version = '0.4.0'
spec.version = '0.4.1'
spec.license = 'MIT'
spec.summary = 'Animated ProgressViews for OS X'
spec.homepage = 'https://github.com/kaunteya/ProgressKit'
+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`