Skip to content

Commit

Permalink
Merge tag '1.2.1' into develop
Browse files Browse the repository at this point in the history
1.2.1
  • Loading branch information
chrwendt committed Apr 19, 2020
2 parents 8469162 + 673da12 commit b6749d8
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 15 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## Version 1.2.1
### Bugfixes
* [Wrong Hex value displayed after entering Hex code (HSB color space)](https://github.com/chrs1885/SheetyColors/issues/24)
* [Delegate not called when hex value changed](https://github.com/chrs1885/SheetyColors/issues/22)
* [Missing imports when adding library via SPM](https://github.com/chrs1885/SheetyColors/issues/18)

## Version 1.2.0
### Features
* [Hex color input field](https://github.com/chrs1885/SheetyColors/issues/15)
Expand All @@ -12,7 +18,7 @@
* [Support Swift Package Manager](https://github.com/chrs1885/SheetyColors/issues/10)

## Version 1.0.1
### Bugfix
### Bugfixes
* Fix version of Capable dependency which was causing issues in projects where Capable was used side by side with SheetyColors

## Version 1.0.0
Expand Down
4 changes: 2 additions & 2 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ PODS:
- Capable/Colors (1.1.4)
- Nimble (8.0.7)
- Quick (2.2.0)
- SheetyColors (1.2.0):
- SheetyColors (1.2.1):
- Capable/Colors (~> 1.1)
- SnapshotTesting (1.7.2)

Expand All @@ -27,7 +27,7 @@ SPEC CHECKSUMS:
Capable: 9f420f2a80a12144814ea2f0ba196516a0827ca1
Nimble: a73af6ecd4c9106f434f3d55fc54570be3739e0b
Quick: 7fb19e13be07b5dfb3b90d4f9824c855a11af40e
SheetyColors: 8dc64a666415be8a81df3c5d44b9088d6f8bee2e
SheetyColors: a0273d30ec5ee02536bb43960ba36d58619ae719
SnapshotTesting: 8caa6661fea7c8019d5b46de77c16bab99c36c5c

PODFILE CHECKSUM: 5095640969646fd5f5546f91228d960c22a55514
Expand Down
4 changes: 2 additions & 2 deletions Example/Tests/GrayscaleViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -263,12 +263,12 @@ class GrayscaleViewModelTests: QuickSpec {
}
}
}

context("when calling hexValueChanged()") {
beforeEach {
sut.hexValueChanged(to: "ABCDEF")
}

it("informs the viewDelegate") {
expect(viewDelegateMock.didCallDidUpdateColorComponent).to(beTrue())
expect(viewDelegateMock.shouldAnimate).to(beTrue())
Expand Down
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[![Awesome](https://camo.githubusercontent.com/13c4e50d88df7178ae1882a203ed57b641674f94/68747470733a2f2f63646e2e7261776769742e636f6d2f73696e647265736f726875732f617765736f6d652f643733303566333864323966656437386661383536353265336136336531353464643865383832392f6d656469612f62616467652e737667)](https://github.com/vsouza/awesome-ios#color)
![Cocoapods(https://cocoapods.org/pods/SheetyColors)](https://img.shields.io/cocoapods/v/SheetyColors.svg)
[![Carthage compatible](https://img.shields.io/badge/carthage-compatible-4BC51D.svg)](https://github.com/Carthage/Carthage)
![UIKit & SwiftUI](https://img.shields.io/badge/iOS-UIKit%20%26%20SwiftUI-yellow)
Expand All @@ -22,6 +23,7 @@
- 👶 **Intuitive UI:** Each slider comes with a gradient that gives you an idea of how changing individual slider values affects the resulting color. All controls do support haptic feedback and will react to any errors such as invalid Hex values.
- 🍏 **SwiftUI & iOS 13 support:** SheetyColors can also be used as part of your SwiftUI projects. Have a look at the *Usage* section to get further info. The library is also optimized to work well with the new Dark Mode.

## Example
| NEW: Hex input |RGB, HSB, and Grayscale|Fully configurable|Dark mode support|
| :-: | :-: | :-: | :-: |
|![Color picker supporting RGB, HSB, and Grayscale][hex_input]|![Color picker supporting RGB, HSB, and Grayscale][minimum_config]|![Fully configurable][fully_configurable]|![Dark mode support][dark_mode]|
Expand All @@ -31,10 +33,7 @@
[fully_configurable]: ./Documentation/demo_customizable.png "Fully configurable"
[dark_mode]: ./Documentation/demo_dark_mode.png "Dark mode support"

## Example
To get a quick overview, you can checkout the example app on [Appetize.io](https://appetize.io/embed/gggkv26ep4xn6819f181ffqxpw?device=iphonex&scale=75&autoplay=false&orientation=portrait&deviceColor=black)

To run the example project from Xcode, clone the repo, and run `pod install` from the Example directory first.
To get a quick overview, you can checkout the example app on [Appetize.io](https://appetize.io/embed/gggkv26ep4xn6819f181ffqxpw?device=iphonex&scale=75&autoplay=false&orientation=portrait&deviceColor=black). To run the example project from Xcode, clone the repo, and run `pod install` from the Example directory first.

## Installation

Expand All @@ -54,7 +53,7 @@ end

```ruby
dependencies: [
.package(url: "https://github.com/chrs1885/SheetyColors.git", from: "1.2.0")
.package(url: "https://github.com/chrs1885/SheetyColors.git", from: "1.2.1")
]
```

Expand Down
2 changes: 1 addition & 1 deletion SheetyColors.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'SheetyColors'
s.version = '1.2.0'
s.version = '1.2.1'
s.summary = 'An action sheet styled color picker for iOS.'

s.description = <<-DESC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ extension GrayscaleViewModel: SheetyColorsViewModelProtocol {

func hexValueChanged(to value: String) {
guard let color = UIColor(hex: value) else { return }

colorModel = color.grayscaleColor
viewDelegate?.didUpdateColorComponent(in: self, shouldAnimate: true)
delegate?.didSelectColor(colorModel.uiColor)
Expand Down
2 changes: 1 addition & 1 deletion SheetyColors/Classes/HSB/Models/HSBAColor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import UIKit
/// A model class representing HSBA colors. The hue component can hold values between 0.0 and 360.0 while the saturation and brightnes values have a maximum value of 100.0.
public class HSBAColor: NSObject, NSCopying, Codable {
var hue, saturation, brightness, alpha: CGFloat

var hexColor: String {
if let colorRef = uiColor.cgColor.components {
let red: CGFloat = colorRef[0]
Expand Down
2 changes: 1 addition & 1 deletion SheetyColors/Classes/HSB/ViewModels/HSBViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ extension HSBViewModel: SheetyColorsViewModelProtocol {

func hexValueChanged(to value: String) {
guard let color = UIColor(hex: value) else { return }

colorModel = color.hsbaColor
viewDelegate?.didUpdateColorComponent(in: self, shouldAnimate: true)
delegate?.didSelectColor(colorModel.uiColor)
Expand Down
2 changes: 1 addition & 1 deletion SheetyColors/Classes/RGB/ViewModels/RGBViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ extension RGBViewModel: SheetyColorsViewModelProtocol {

func hexValueChanged(to value: String) {
guard let color = UIColor(hex: value) else { return }

colorModel = color.rgbaColor
viewDelegate?.didUpdateColorComponent(in: self, shouldAnimate: true)
delegate?.didSelectColor(colorModel.uiColor)
Expand Down

0 comments on commit b6749d8

Please sign in to comment.