This repository has been archived by the owner on Dec 5, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Daniel Metzing
committed
Feb 13, 2018
1 parent
1d2ea3f
commit c40526c
Showing
5 changed files
with
94 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
// | ||
// Configuration.swift | ||
// SwiftMonkeyPaws | ||
// | ||
// Created by Daniel.Metzing on 11.02.18. | ||
// | ||
|
||
import UIKit | ||
|
||
public struct Configuration { | ||
// Customise the appearance of the paws | ||
public struct Paws { | ||
|
||
/// Define the colour of the Paws | ||
/// | ||
/// - randomized: random colour for each paw | ||
/// - constant: same colour for the paws | ||
public enum Color { | ||
case randomized | ||
case constant(UIColor) | ||
} | ||
// Colour of the paws | ||
public let color: Color | ||
|
||
// Brightness of a particular paw | ||
public let brightness: CGFloat | ||
|
||
// Maximum visible paws at one time | ||
public let maxShown: Int | ||
|
||
public init(colour: Color = .randomized, brightness: CGFloat = 0.5, maxShown: Int = 15) { | ||
self.color = colour | ||
self.brightness = brightness | ||
self.maxShown = maxShown | ||
} | ||
} | ||
|
||
public struct Radius { | ||
|
||
/// Radius of the cross draw upon canceling a touch event | ||
public let cross: CGFloat | ||
|
||
/// Radius of the circle draw upon ending a touch event | ||
public let circle: CGFloat | ||
|
||
public init(cross: CGFloat = 7, circle: CGFloat = 7) { | ||
self.cross = cross | ||
self.circle = circle | ||
} | ||
} | ||
|
||
public let paws: Paws | ||
public let radius: Radius | ||
|
||
public init(paws: Paws = Paws(), radius: Radius = Radius()) { | ||
self.paws = paws | ||
self.radius = radius | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 0 additions & 62 deletions
62
SwiftMonkeyPaws/Sources/Extensions/MonkeyPaws+Configuration.swift
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters