10 Commits

Author SHA1 Message Date
Kaunteya Suryawanshi f7da0a11a0 Updated podspec 2015-10-08 12:49:13 +05:30
Kaunteya Suryawanshi 31c3ec2510 Updated 2015-10-08 12:47:48 +05:30
Kaunteya Suryawanshi bd82ddebde Updated the base version to 10.10 2015-10-08 11:40:32 +05:30
Kaunteya Suryawanshi 4e9f5f1a5e Updated the podspec 2015-10-08 11:15:04 +05:30
Kaunteya Suryawanshi 673b9640cf Merge branch 'master' of https://github.com/kaunteya/ProgressKit 2015-10-08 11:08:06 +05:30
Kaunteya Suryawanshi 90fe33531a Swift 2.0 2015-10-08 11:04:16 +05:30
Kaunteya Suryawanshi d20c565ee4 Added tag line 2015-10-06 21:17:48 +05:30
Kaunteya Suryawanshi 3f2a90ea9a Updated formatting 2015-10-06 20:55:21 +05:30
Kaunteya Suryawanshi 9df1f477d2 Added banner.gif 2015-10-06 20:50:40 +05:30
Kaunteya Suryawanshi aa019d3bcb Updated the banner 2015-10-06 20:49:54 +05:30
16 changed files with 41 additions and 33 deletions
+3 -3
View File
@@ -67,7 +67,7 @@ public class CircularProgressView: DeterminateAnimation {
backgroundCircle.strokeColor = foreground.colorWithAlphaComponent(0.5).CGColor
backgroundCircle.fillColor = NSColor.clearColor().CGColor
var backgroundPath = NSBezierPath()
let backgroundPath = NSBezierPath()
backgroundPath.appendBezierPathWithArcWithCenter(rect.mid, radius: radius, startAngle: 0, endAngle: 360)
backgroundCircle.path = backgroundPath.CGPath
self.layer?.addSublayer(backgroundCircle)
@@ -82,8 +82,8 @@ public class CircularProgressView: DeterminateAnimation {
progressLayer.frame = rect
progressLayer.strokeColor = foreground.CGColor
var arcPath = NSBezierPath()
var startAngle = CGFloat(90)
let arcPath = NSBezierPath()
let startAngle = CGFloat(90)
arcPath.appendBezierPathWithArcWithCenter(rect.mid, radius: radius, startAngle: startAngle, endAngle: (startAngle - 360), clockwise: true)
progressLayer.path = arcPath.CGPath
self.layer?.addSublayer(progressLayer)
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 494 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

+3 -3
View File
@@ -61,7 +61,7 @@ public class CircularSnail: IndeterminateAnimation {
var strokeEndAnimation: CABasicAnimation!
func makeAnimationforKeyPath(keyPath: String) -> CABasicAnimation {
var tempAnimation = CABasicAnimation(keyPath: keyPath)
let tempAnimation = CABasicAnimation(keyPath: keyPath)
tempAnimation.repeatCount = 1
tempAnimation.speed = 2.0
tempAnimation.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseInEaseOut)
@@ -91,7 +91,7 @@ public class CircularSnail: IndeterminateAnimation {
let radius = (rect.width / 2) * 0.75
progressLayer.frame = rect
progressLayer.lineWidth = lineWidth == -1 ? radius / 10: lineWidth
var arcPath = NSBezierPath()
let arcPath = NSBezierPath()
arcPath.appendBezierPathWithArcWithCenter(rect.mid, radius: radius, startAngle: 0, endAngle: 360, clockwise: false)
progressLayer.path = arcPath.CGPath
backgroundRotationLayer.addSublayer(progressLayer)
@@ -99,7 +99,7 @@ public class CircularSnail: IndeterminateAnimation {
var currentRotation = 0.0
let π2 = M_PI * 2
override public func animationDidStop(anim: CAAnimation!, finished flag: Bool) {
override public func animationDidStop(anim: CAAnimation, finished flag: Bool) {
if !animate { return }
CATransaction.begin()
CATransaction.setDisableActions(true)
+5 -5
View File
@@ -36,7 +36,7 @@ public class Crawler: IndeterminateAnimation {
let insetRect = NSInsetRect(rect, rect.width * 0.15, rect.width * 0.15)
for var i = 0.0; i < 5; i++ {
var starShape = CAShapeLayer()
let starShape = CAShapeLayer()
starList.append(starShape)
starShape.backgroundColor = foreground.CGColor
@@ -46,16 +46,16 @@ public class Crawler: IndeterminateAnimation {
starShape.position = CGPoint(x: rect.midX, y: rect.midY + insetRect.height / 2)
self.layer?.addSublayer(starShape)
var arcPath = NSBezierPath()
let arcPath = NSBezierPath()
arcPath.appendBezierPathWithArcWithCenter(insetRect.mid, radius: insetRect.width / 2, startAngle: 90, endAngle: -360 + 90, clockwise: true)
var rotationAnimation = CAKeyframeAnimation(keyPath: "position")
let rotationAnimation = CAKeyframeAnimation(keyPath: "position")
rotationAnimation.path = arcPath.CGPath
rotationAnimation.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseOut)
rotationAnimation.beginTime = (duration * 0.075) * i
rotationAnimation.calculationMode = kCAAnimationCubicPaced
var animationGroup = CAAnimationGroup()
let animationGroup = CAAnimationGroup()
animationGroup.animations = [rotationAnimation]
animationGroup.duration = duration
animationGroup.repeatCount = Float.infinity
@@ -65,7 +65,7 @@ public class Crawler: IndeterminateAnimation {
}
override func startAnimation() {
for (index, star) in enumerate(starList) {
for (index, star) in starList.enumerate() {
star.addAnimation(animationGroups[index], forKey: "")
}
}
+1 -1
View File
@@ -19,7 +19,7 @@ public class Rainbow: CircularSnail {
self.background = NSColor.clearColor()
}
override public func animationDidStop(anim: CAAnimation!, finished flag: Bool) {
override public func animationDidStop(anim: CAAnimation, finished flag: Bool) {
super.animationDidStop(anim, finished: flag)
if onLightOffDark {
progressLayer.strokeColor = lightColorList[Int(arc4random()) % lightColorList.count].CGColor
+1 -1
View File
@@ -67,7 +67,7 @@ public class ShootingStars: IndeterminateAnimation {
tempAnimation.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseIn)
}
override public func animationDidStop(anim: CAAnimation!, finished flag: Bool) {
override public func animationDidStop(anim: CAAnimation, finished flag: Bool) {
starLayer2.addAnimation(animation, forKey: "default")
}
+2 -2
View File
@@ -80,8 +80,8 @@ public class Spinner: IndeterminateAnimation {
var iRadian = CGFloat(i * M_PI / 180.0)
if clockwise { iRadian = -iRadian }
animation.values.append(iRadian)
var starShape = CAShapeLayer()
animation.values?.append(iRadian)
let starShape = CAShapeLayer()
starShape.cornerRadius = roundedCorners ? starSize.width / 2 : 0
let centerLocation = CGPoint(x: frame.width / 2 - starSize.width / 2, y: frame.width / 2 - starSize.height / 2)
+2 -2
View File
@@ -1,13 +1,13 @@
Pod::Spec.new do |spec|
spec.name = 'ProgressKit'
spec.version = '0.1.1'
spec.version = '0.3.0'
spec.license = 'MIT'
spec.summary = 'Animated ProgressViews for OSX'
spec.homepage = 'https://github.com/kaunteya/ProgressKit'
spec.authors = { 'Kaunteya Suryawanshi' => 'k.suryawanshi@gmail.com' }
spec.source = { :git => 'https://github.com/kaunteya/ProgressKit.git', :tag => spec.version }
spec.platform = :osx, '10.9'
spec.platform = :osx, '10.10'
spec.requires_arc = true
spec.source_files = 'Determinate/*.swift', 'InDeterminate/*.swift', 'ProgressUtils.swift', 'BaseView.swift'
+8 -1
View File
@@ -205,7 +205,9 @@
E3AD65CA1B426758009541CD /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0630;
LastSwiftMigration = 0700;
LastSwiftUpdateCheck = 0700;
LastUpgradeCheck = 0700;
ORGANIZATIONNAME = "Kauntey Suryawanshi";
TargetAttributes = {
E3AD65D11B426758009541CD = {
@@ -328,6 +330,7 @@
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
@@ -394,6 +397,7 @@
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = ProgressKit/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.kaunteya.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
@@ -405,6 +409,7 @@
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = ProgressKit/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.kaunteya.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
@@ -424,6 +429,7 @@
);
INFOPLIST_FILE = ProgressKitTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.kaunteya.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ProgressKit.app/Contents/MacOS/ProgressKit";
};
@@ -440,6 +446,7 @@
);
INFOPLIST_FILE = ProgressKitTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.kaunteya.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ProgressKit.app/Contents/MacOS/ProgressKit";
};
+3 -3
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="7706" systemVersion="14F27" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="B8D-0N-5wS">
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="8191" systemVersion="14F27" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="B8D-0N-5wS">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="7706"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="8191"/>
</dependencies>
<scenes>
<!--Application-->
@@ -690,7 +690,7 @@
<scene sceneID="poQ-ev-CZa">
<objects>
<viewController id="rgo-kk-Wcf" customClass="InDeterminateViewController" customModule="ProgressKit" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" id="lmx-kT-Si1">
<view key="view" wantsLayer="YES" id="lmx-kT-Si1">
<rect key="frame" x="0.0" y="0.0" width="500" height="184"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
+2 -2
View File
@@ -22,9 +22,9 @@ class DeterminateViewController: NSViewController {
@IBAction func sliderDragged(sender: NSSlider) {
let event = NSApplication.sharedApplication().currentEvent
let dragStart = event!.type == NSEventType.LeftMouseDown
// let dragStart = event!.type == NSEventType.LeftMouseDown
let dragEnd = event!.type == NSEventType.LeftMouseUp
let dragging = event!.type == NSEventType.LeftMouseDragged
// let dragging = event!.type == NSEventType.LeftMouseDragged
if liveProgress || dragEnd {
setProgress(CGFloat(sender.floatValue))
+1 -1
View File
@@ -9,7 +9,7 @@
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>com.kaunteya.$(PRODUCT_NAME:rfc1034identifier)</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
+1 -1
View File
@@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>com.kaunteya.$(PRODUCT_NAME:rfc1034identifier)</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
+2 -2
View File
@@ -18,8 +18,8 @@ extension NSRect {
extension NSBezierPath {
/// Converts NSBezierPath to CGPath
var CGPath: CGPathRef {
var path = CGPathCreateMutable()
var points = UnsafeMutablePointer<NSPoint>.alloc(3)
let path = CGPathCreateMutable()
let points = UnsafeMutablePointer<NSPoint>.alloc(3)
let numElements = self.elementCount
if numElements > 0 {
+7 -6
View File
@@ -1,6 +1,8 @@
![Image](/Images/banner.png)
![Image](/Images/banner.gif)
`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.
# Contents
- [Installation](#installation)
@@ -16,7 +18,7 @@
# Installation
##CocoaPods
[CocoaPods 0.36](http://cocoapods.org) adds supports for Swift and embedded frameworks.
[CocoaPods](http://cocoapods.org) adds supports for Swift and embedded frameworks.
To integrate ProgressKit into your Xcode project using CocoaPods, specify it in your `Podfile`:
@@ -34,7 +36,7 @@ $ pod install
# Usage
- Drag a View at desired location in `XIB` or `Storyboard`
- Change the Class to any of the desired progress Views
- Change the Class to any of the desired progress views
- Set the size such that width and height are equal
- Drag `IBOutlet` to View Controller
- For `Indeterminate` Progress Views
@@ -48,8 +50,7 @@ $ pod install
![Indeterminate](/Images/indeterminate.gif)
Progress indicators which animate indefinately are `Indeterminate Progress` Views.
This are the InDeterminate Progress Indicators.
This are the set of Indeterminate Progress Indicators.
## CircularSnail
![CircularSnail](/Images/CircularSnail.gif)
@@ -61,7 +62,7 @@ This are the InDeterminate Progress Indicators.
![Spinner](/Images/Spinner.gif)
# Determinate Progress
Determinate progress views can be used for tasks whos progress can be seen and determined gradually.
Determinate progress views can be used for tasks whos progress can be seen and determined.
## Circular Progress
![Circular Progress](/Images/CircularProgress.png)