Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Marxon13/M13Checkbox
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2.1.1
Choose a base ref
...
head repository: Marxon13/M13Checkbox
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on May 26, 2016

  1. Checked iOS 8 Compatibility

    Marxon13 committed May 26, 2016
    Copy the full SHA
    c598d1b View commit details

Commits on Sep 11, 2016

  1. Updated to Swift 3.

    Marxon13 committed Sep 11, 2016
    Copy the full SHA
    7d05d00 View commit details
  2. Merge pull request #56 from Marxon13/swift3

    Updated to Swift 3.
    Marxon13 authored Sep 11, 2016
    Copy the full SHA
    fa34386 View commit details
  3. Converted from open to public.

    I don’t see any reasons subclassing this is necessary. If there is a
    reason I’ll change it back.
    Marxon13 committed Sep 11, 2016
    Copy the full SHA
    c1d73b5 View commit details
  4. Copy the full SHA
    df515ec View commit details
  5. Bumped project version.

    Marxon13 committed Sep 11, 2016
    Copy the full SHA
    7cdff1d View commit details

Commits on Sep 23, 2016

  1. Demo playground.

    Robert Nash committed Sep 23, 2016
    Copy the full SHA
    4e52985 View commit details
  2. Fixed origin offset issue.

    Robert Nash committed Sep 23, 2016
    Copy the full SHA
    d563755 View commit details

Commits on Sep 24, 2016

  1. Copy the full SHA
    77bc590 View commit details

Commits on Sep 28, 2016

  1. Added swift-version file.

    Fixes issue #57.
    Marxon13 committed Sep 28, 2016
    Copy the full SHA
    7cd14c1 View commit details
  2. Merge pull request #62 from rob-nash/master

    Added demo playground
    Fixed rendering bug.
    Marxon13 authored Sep 28, 2016
    Copy the full SHA
    0294410 View commit details
  3. Copy the full SHA
    f2768e9 View commit details
  4. Copy the full SHA
    9e07dc1 View commit details
  5. Copy the full SHA
    9a63be8 View commit details
  6. Fixed layout bug causing misalignment at small sizes.

    The checkbox path was being shifted by half the box line width when it
    did not need to be.
    Marxon13 committed Sep 28, 2016
    Copy the full SHA
    3e4a4e4 View commit details
  7. Copy the full SHA
    43ff6c6 View commit details

Commits on Sep 29, 2016

  1. removed long compile time vars

    szotyi committed Sep 29, 2016
    Copy the full SHA
    4a61d6d View commit details

Commits on Sep 30, 2016

  1. Copy the full SHA
    e9861c3 View commit details
  2. remove compile profile flags

    szotyi committed Sep 30, 2016
    Copy the full SHA
    66148db View commit details
  3. remove compile profile flags

    szotyi committed Sep 30, 2016
    Copy the full SHA
    b080afd View commit details
  4. Copy the full SHA
    5fb7628 View commit details
  5. Copy the full SHA
    3628b40 View commit details
  6. Finalized import of PR #67.

    Compile time decrease.
    Marxon13 committed Sep 30, 2016
    Copy the full SHA
    fb5ec9d View commit details
  7. Updated podspec.

    Marxon13 committed Sep 30, 2016
    Copy the full SHA
    c6d0f73 View commit details

Commits on Oct 5, 2016

  1. Removed overridden build setting.

    Removed the override for ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES that is
    causing warnings on Cocoapods 1.1.0 RC2.
    brandon-mcquilkin-kr committed Oct 5, 2016
    Copy the full SHA
    18db06b View commit details
  2. Fixed issue #69

    Multiple commits caused math issues by modifying the positioning
    equations. Copied the original equations back in, and re-modified them
    to keep build time low
    brandon-mcquilkin-kr committed Oct 5, 2016
    Copy the full SHA
    9b185ca View commit details
  3. Copy the full SHA
    99f32d9 View commit details

Commits on Oct 6, 2016

  1. Copy the full SHA
    489ab17 View commit details
  2. New behind the scenes implementation.

    - The controllers and animation/path generation has been upgraded to
    allow for the addition of new marks.
    - Changing between marks can now be animated.
    - Adjusted mixed states for radio to remove animation glitches.
    brandon-mcquilkin-kr committed Oct 6, 2016
    Copy the full SHA
    48cc8d2 View commit details

Commits on Oct 7, 2016

  1. Copy the full SHA
    8b8883c View commit details

Commits on Oct 10, 2016

  1. Copy the full SHA
    43d19ae View commit details

Commits on Oct 11, 2016

  1. Copy the full SHA
    178f5c7 View commit details

Commits on Nov 7, 2016

  1. Patching Crash

    Fixed how fromValue is being cast
    dpopov committed Nov 7, 2016
    Copy the full SHA
    3be7b6b View commit details

Commits on Nov 10, 2016

  1. Merge pull request #75 from dpopov/master

    Patching Crash
    Marxon13 authored Nov 10, 2016
    Copy the full SHA
    e569ffe View commit details
  2. Increment version number.

    Marxon13 committed Nov 10, 2016
    Copy the full SHA
    e1c349a View commit details
  3. Fixed release tag.

    Marxon13 committed Nov 10, 2016
    Copy the full SHA
    869b662 View commit details

Commits on Nov 21, 2016

  1. Changed public interface to open to allow subclassing

    Dariusz Cieśla committed Nov 21, 2016
    Copy the full SHA
    988915d View commit details

Commits on Dec 13, 2016

  1. Merge pull request #79 from darecki/public_open

    Changed public interface to open to allow subclassing
    Marxon13 authored Dec 13, 2016
    Copy the full SHA
    55be164 View commit details
  2. Updated podspec version

    Marxon13 committed Dec 13, 2016
    Copy the full SHA
    0ff6028 View commit details

Commits on Feb 14, 2017

  1. removes redundant protocol conformity information

    Hendrik Schultjan committed Feb 14, 2017
    Copy the full SHA
    165bb36 View commit details

Commits on Mar 28, 2017

  1. Copy the full SHA
    c78d019 View commit details

Commits on May 2, 2017

  1. Copy the full SHA
    a0b141e View commit details

Commits on May 16, 2017

  1. Merge pull request #94 from jp26jp/patch-1

    Updated syntax and fixed location of example images
    Marxon13 authored May 16, 2017
    Copy the full SHA
    884afdb View commit details
  2. Merge pull request #90 from Awalz/master

    Removed Depracated M_PI warnings
    Marxon13 authored May 16, 2017
    Copy the full SHA
    3492049 View commit details
  3. Merge pull request #84 from HSchultjan/master

    removes redundant protocol conformity information
    Marxon13 authored May 16, 2017
    Copy the full SHA
    6d61652 View commit details

Commits on Jul 28, 2017

  1. Copy the full SHA
    5122209 View commit details

Commits on Jul 30, 2017

  1. Copy the full SHA
    4255167 View commit details
  2. Copy the full SHA
    38c95be View commit details
  3. Copy the full SHA
    6ba8903 View commit details
  4. Copy the full SHA
    65be638 View commit details
Showing with 4,102 additions and 3,488 deletions.
  1. +10 −0 .gitignore
  2. +21 −0 LICENSE
  3. +10 −0 M13Checkbox Demo Playground/LaunchMe.xcworkspace/contents.xcworkspacedata
  4. BIN ... Playground/LaunchMe.xcworkspace/xcuserdata/bmcquilkin.xcuserdatad/UserInterfaceState.xcuserstate
  5. +63 −0 M13Checkbox Demo Playground/Playground.playground/Contents.swift
  6. +4 −0 M13Checkbox Demo Playground/Playground.playground/contents.xcplayground
  7. +26 −25 M13Checkbox Demo/AnimationSelectionTableViewController.swift
  8. +6 −6 M13Checkbox Demo/AppDelegate.swift
  9. BIN M13Checkbox Demo/Assets.xcassets/Animation Icons/Fade.imageset/Fade.pdf
  10. +25 −0 M13Checkbox Demo/Assets.xcassets/AppIcon.appiconset/Contents.json
  11. +15 −0 M13Checkbox Demo/Assets.xcassets/Property Icons/Morph.imageset/Contents.json
  12. BIN M13Checkbox Demo/Assets.xcassets/Property Icons/Morph.imageset/Morph.pdf
  13. +86 −119 M13Checkbox Demo/Base.lproj/Main.storyboard
  14. +22 −22 M13Checkbox Demo/CollectionViewLayout.swift
  15. +7 −7 M13Checkbox Demo/ColorCollectionViewCell.swift
  16. +219 −173 M13Checkbox Demo/DemoViewController.swift
  17. +1 −1 M13Checkbox Demo/SegmentedControlCollectionViewCell.swift
  18. +2 −2 M13Checkbox Demo/SelectionCollectionViewCell.swift
  19. +1 −1 M13Checkbox Demo/SliderCollectionViewCell.swift
  20. +6 −5 M13Checkbox.podspec
  21. +178 −122 M13Checkbox.xcodeproj/project.pbxproj
  22. +1 −1 M13Checkbox.xcodeproj/xcshareddata/xcschemes/M13Checkbox.xcscheme
  23. +12 −16 Sources/Presets/M13CheckboxDotPathPresets.swift → M13Checkbox/DefaultValues.swift
  24. +1 −1 M13Checkbox/Info.plist
  25. +26 −8 Package.swift
  26. +67 −67 Readme.md
  27. BIN Resources/Fade.pdf
  28. BIN Resources/Icons 2.sketch
  29. BIN Resources/Morph.pdf
  30. +25 −0 Sources/DefaultValues.swift
  31. +8 −8 Sources/M13Checkbox+IB.swift
  32. +168 −171 Sources/M13Checkbox.swift
  33. +29 −29 Sources/{M13CheckboxAnimationPresets.swift → M13CheckboxAnimationGenerator.swift}
  34. +158 −0 Sources/M13CheckboxController.swift
  35. +6 −6 Sources/M13CheckboxGestureRecognizer.swift
  36. +0 −91 Sources/M13CheckboxManager.swift
  37. +0 −359 Sources/M13CheckboxPathPresets.swift
  38. +250 −0 Sources/Managers/M13CheckboxBounceController.swift
  39. +0 −278 Sources/Managers/M13CheckboxBounceManager.swift
  40. +253 −0 Sources/Managers/M13CheckboxDotController.swift
  41. +0 −284 Sources/Managers/M13CheckboxDotManager.swift
  42. +243 −0 Sources/Managers/M13CheckboxExpandController.swift
  43. +0 −271 Sources/Managers/M13CheckboxExpandManager.swift
  44. +240 −0 Sources/Managers/M13CheckboxFadeController.swift
  45. +0 −268 Sources/Managers/M13CheckboxFadeManager.swift
  46. +210 −0 Sources/Managers/M13CheckboxFillController.swift
  47. +0 −240 Sources/Managers/M13CheckboxFillManager.swift
  48. +259 −0 Sources/Managers/M13CheckboxFlatController.swift
  49. +0 −293 Sources/Managers/M13CheckboxFlatManager.swift
  50. +266 −0 Sources/Managers/M13CheckboxSpiralController.swift
  51. +0 −293 Sources/Managers/M13CheckboxSpiralManager.swift
  52. +213 −0 Sources/Managers/M13CheckboxStrokeController.swift
  53. +0 −245 Sources/Managers/M13CheckboxStrokeManager.swift
  54. +165 −0 Sources/Paths/M13CheckboxAddRemovePathGenerator.swift
  55. +323 −0 Sources/Paths/M13CheckboxCheckPathGenerator.swift
  56. +174 −0 Sources/Paths/M13CheckboxDisclosurePathGenerator.swift
  57. +252 −0 Sources/Paths/M13CheckboxPathGenerator.swift
  58. +51 −0 Sources/Paths/M13CheckboxRadioPathGenerator.swift
  59. +0 −76 Sources/Presets/M13CheckboxSpiralPathPresets.swift
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -6,3 +6,13 @@ M13Checkbox.xcodeproj/xcuserdata/
M13Checkbox.xcworkspace/
Pods/
Podfile.lock
Playground/LaunchMe.xcworkspace/xcuserdata/*

# Swift Package Manager
#
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
# Packages/
# Package.pins
# Package.resolved
.build/
.swiftpm/
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2018 Brandon McQuilkin

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
63 changes: 63 additions & 0 deletions M13Checkbox Demo Playground/Playground.playground/Contents.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
//: Playground - noun: a place where people can play

import M13Checkbox
import PlaygroundSupport

//: Creating A Checkbox
//: -------------------

let checkbox = M13Checkbox(frame: CGRect(x: 0.0, y: 0.0, width: 250.0, height: 250.0))

//: Managing States
//: ---------------

// Update the state of the checkbox programatically, with or without animation.
checkbox.setCheckState(.checked, animated: false)
checkbox.setCheckState(.unchecked, animated: false)

// Or toggle the state
checkbox.toggleCheckState(false)

// Set values to the checkbox to return depending on its state.
checkbox.checkedValue = 1.0
checkbox.uncheckedValue = 0.0
checkbox.mixedValue = 0.5

print("Checkbox Value: \(checkbox.value)")

//: Animations
//: ----------

// Update the animation duration
checkbox.animationDuration = 1.0

// Change the animation used when switching between states.
checkbox.stateChangeAnimation = .bounce(.fill)

//: Appearance
//: ----------

// The background color of the veiw.
checkbox.backgroundColor = .white
// The tint color when in the selected state.
checkbox.tintColor = .yellow
// The tint color when in the unselected state.
checkbox.secondaryTintColor = .green
// The color of the checkmark when the animation is a "fill" style animation.
checkbox.secondaryCheckmarkTintColor = .red

// Whether or not to display a checkmark, or radio mark.
checkbox.markType = .checkmark
// The line width of the checkmark.
checkbox.checkmarkLineWidth = 2.0

// The line width of the box.
checkbox.boxLineWidth = 2.0
// The corner radius of the box if it is a square.
checkbox.cornerRadius = 4.0
// Whether the box is a square, or circle.
checkbox.boxType = .circle
// Whether or not to hide the box.
checkbox.hideBox = false

PlaygroundPage.current.liveView = checkbox
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<playground version='5.0' target-platform='ios' display-mode='raw'>
<timeline fileName='timeline.xctimeline'/>
</playground>
51 changes: 26 additions & 25 deletions M13Checkbox Demo/AnimationSelectionTableViewController.swift
Original file line number Diff line number Diff line change
@@ -7,92 +7,93 @@
//

import UIKit
import M13Checkbox

protocol AnimationSelectionTableViewControllerDelegate {
func selectedAnimation(animation: M13Checkbox.Animation)
func selectedAnimation(_ animation: M13Checkbox.Animation)
}

class AnimationSelectionTableViewController: UITableViewController {

let animations: [M13Checkbox.Animation] = [.Stroke, .Fill, .Bounce(.Stroke), .Expand(.Stroke), .Flat(.Stroke), .Spiral, .Fade(.Stroke), .Dot(.Stroke)]
let animations: [M13Checkbox.Animation] = [.stroke, .fill, .bounce(.stroke), .expand(.stroke), .flat(.stroke), .spiral, .fade(.stroke), .dot(.stroke)]
var delegate: AnimationSelectionTableViewControllerDelegate?

override func viewDidLoad() {
super.viewDidLoad()

tableView.backgroundColor = UIColor.clearColor()
tableView.backgroundView?.backgroundColor = UIColor.clearColor()
tableView.backgroundColor = UIColor.clear
tableView.backgroundView?.backgroundColor = UIColor.clear
}

// MARK: - Table view data source

override func numberOfSectionsInTableView(tableView: UITableView) -> Int {
override func numberOfSections(in tableView: UITableView) -> Int {
return 1
}

override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
// #warning Incomplete implementation, return the number of rows
return animations.count
}


override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCellWithIdentifier("animationCell", forIndexPath: indexPath)
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "animationCell", for: indexPath)

let animation = animations[indexPath.row]
let animation = animations[(indexPath as NSIndexPath).row]

switch animation {
case .Stroke:
case .stroke:
cell.textLabel?.text = "Stroke"
cell.imageView?.image = UIImage(named: "Stroke")
case .Fill:
case .fill:
cell.textLabel?.text = "Fill"
cell.imageView?.image = UIImage(named: "Fill")
case .Bounce:
case .bounce:
cell.textLabel?.text = "Bounce"
cell.imageView?.image = UIImage(named: "Bounce")
case .Expand:
case .expand:
cell.textLabel?.text = "Expand"
cell.imageView?.image = UIImage(named: "Expand")
case .Flat:
case .flat:
cell.textLabel?.text = "Flat"
cell.imageView?.image = UIImage(named: "Flat")
case .Spiral:
case .spiral:
cell.textLabel?.text = "Spiral"
cell.imageView?.image = UIImage(named: "Spiral")
case .Fade:
case .fade:
cell.textLabel?.text = "Fade"
cell.imageView?.image = UIImage(named: "Fade")
case .Dot:
case .dot:
cell.textLabel?.text = "Dot"
cell.imageView?.image = UIImage(named: "Dot")
}

return cell
}

override func tableView(tableView: UITableView, willDisplayCell cell: UITableViewCell, forRowAtIndexPath indexPath: NSIndexPath) {
cell.backgroundColor = UIColor.clearColor()
cell.contentView.backgroundColor = UIColor.clearColor()
override func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) {
cell.backgroundColor = UIColor.clear
cell.contentView.backgroundColor = UIColor.clear
}

override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
delegate?.selectedAnimation(animations[indexPath.row])
presentingViewController?.dismissViewControllerAnimated(true, completion: nil)
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
delegate?.selectedAnimation(animations[(indexPath as NSIndexPath).row])
presentingViewController?.dismiss(animated: true, completion: nil)
}

}

@IBDesignable
class AnimationCell: UITableViewCell {

@IBInspectable var imageSize: CGSize = CGSizeZero
@IBInspectable var imageSize: CGSize = CGSize.zero


override func layoutSubviews() {
super.layoutSubviews()
if let imageView = imageView {
imageView.frame = CGRectMake(imageView.frame.origin.x, (frame.size.height - imageSize.height) / 2.0, imageSize.width, imageSize.height)
imageView.frame = CGRect(x: imageView.frame.origin.x, y: (frame.size.height - imageSize.height) / 2.0, width: imageSize.width, height: imageSize.height)
}
}

12 changes: 6 additions & 6 deletions M13Checkbox Demo/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -16,29 +16,29 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?


func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
return true
}

func applicationWillResignActive(application: UIApplication) {
func applicationWillResignActive(_ application: UIApplication) {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}

func applicationDidEnterBackground(application: UIApplication) {
func applicationDidEnterBackground(_ application: UIApplication) {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}

func applicationWillEnterForeground(application: UIApplication) {
func applicationWillEnterForeground(_ application: UIApplication) {
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
}

func applicationDidBecomeActive(application: UIApplication) {
func applicationDidBecomeActive(_ application: UIApplication) {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}

func applicationWillTerminate(application: UIApplication) {
func applicationWillTerminate(_ application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}

Binary file not shown.
25 changes: 25 additions & 0 deletions M13Checkbox Demo/Assets.xcassets/AppIcon.appiconset/Contents.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "iphone",
@@ -36,6 +46,16 @@
"filename" : "Icon-60@3x.png",
"scale" : "3x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "ipad",
@@ -77,6 +97,11 @@
"idiom" : "ipad",
"filename" : "Icon-83.5@2x.png",
"scale" : "2x"
},
{
"idiom" : "ios-marketing",
"size" : "1024x1024",
"scale" : "1x"
}
],
"info" : {
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "Morph.pdf"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "template"
}
}
Binary file not shown.
Loading