5 Commits

Author SHA1 Message Date
Jalal Ouraigua c3cf5527fd Added Carthage support 2019-01-11 04:35:03 +00:00
Jalal Ouraigua ad0cf786c8 Add Carthage support 2019-01-11 04:14:36 +00:00
Jalal Ouraigua ea35c92b6a Progress 2018-12-23 18:28:27 +00:00
Jalal Ouraigua 1490573852 Fix Slide's value rounding issue 2018-12-22 19:21:05 +00:00
Jalal Ouraigua 68f31bfa1f Remove isNegative. No longer needed 2018-12-22 05:49:20 +00:00
10 changed files with 91 additions and 17 deletions
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict/>
</plist>
+1 -1
View File
@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.0.1</string>
<string>2.0.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1010"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2A42614483C3321D5589EF03C68BD21C"
BuildableName = "JOCircularSlider.framework"
BlueprintName = "JOCircularSlider"
ReferencedContainer = "container:Pods.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2A42614483C3321D5589EF03C68BD21C"
BuildableName = "JOCircularSlider.framework"
BlueprintName = "JOCircularSlider"
ReferencedContainer = "container:Pods.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.0.1</string>
<string>2.0.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.0.1</string>
<string>2.0.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.0.1</string>
<string>2.0.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
+1 -1
View File
@@ -8,7 +8,7 @@
Pod::Spec.new do |s|
s.name = 'JOCircularSlider'
s.version = '2.0.1'
s.version = '2.0.3'
s.summary = 'A highly customisable and reusable iOS circular slider.'
# This description is used to generate tags and improve search results.
+2 -12
View File
@@ -261,11 +261,6 @@ open class CircularSlider: UIControl {
set { renderer.isClockwise = newValue }
}
@IBInspectable open var isNegative: Bool {
get { return renderer.isNegative }
set { renderer.isNegative = newValue }
}
@IBInspectable open var labelDecimalPlaces: Int = 0
// MARK: - Private Properties
@@ -362,11 +357,6 @@ class Renderer {
maxiDotView.isClockwise = isClockwise
}
}
fileprivate var isNegative: Bool = false {
didSet {
}
}
fileprivate var textFieldIsHidden: Bool = false
fileprivate var fontSizeMultiplier: CGFloat = 0.5
@@ -464,7 +454,7 @@ private extension Renderer {
textField.layer.cornerRadius = 3
textField.textAlignment = .center
textField.text = ""
textField.keyboardType = .numberPad
textField.keyboardType = .numbersAndPunctuation
textField.keyboardAppearance = .dark
textField.clearsOnInsertion = true
textField.adjustsFontSizeToFitWidth = true
@@ -536,7 +526,7 @@ private extension Renderer {
decimalPlaces = 2
}
guard let newValue = Float(String(format: "%.\(decimalPlaces)f", _value)) else { return }
let newValue = _value.roundedDown(toPlaces: decimalPlaces)
switch newValue {
case minimum: textField.text = "MIN"
+2
View File
@@ -44,6 +44,8 @@ class KnobView: UIView {
}
}
var shadowOpacity: Float = 0.4 {
didSet {
middleCircleShadow.shadowOpacity = shadowOpacity
+6
View File
@@ -35,6 +35,12 @@ it, simply add the following line to your Podfile:
pod 'JOCircularSlider'
```
JOCircularSlider is also available through [Carthage](https://github.com/Carthage/Carthage). To install it, simply add the following line to your [Cartfile](https://github.com/Carthage/Carthage/blob/master/Documentation/Artifacts.md#cartfile):
``` ruby
github "ouraigua/JOCircularSlider"
```
## Usage
1. Visually: