Skip to content
This repository has been archived by the owner on Aug 8, 2020. It is now read-only.

Commit

Permalink
Merge pull request #4 from schemers/master
Browse files Browse the repository at this point in the history
Updated access modifiers of IBInspectable to public so as to make them usable outside of IB
  • Loading branch information
kaunteya committed Nov 22, 2015
2 parents 0113a09 + 27cdcf5 commit 7d84b4e
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 19 deletions.
8 changes: 4 additions & 4 deletions BaseView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand All @@ -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()
}
Expand Down
4 changes: 2 additions & 2 deletions Determinate/CircularProgressView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down
2 changes: 1 addition & 1 deletion Determinate/ProgressBar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down
2 changes: 1 addition & 1 deletion InDeterminate/CircularSnail.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion InDeterminate/IndeterminateAnimation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion InDeterminate/Rainbow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
6 changes: 3 additions & 3 deletions InDeterminate/RotatingArc.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down
12 changes: 6 additions & 6 deletions InDeterminate/Spinner.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down

0 comments on commit 7d84b4e

Please sign in to comment.