From 380e6e267ab8da45f021add12b43a6dd88b8e844 Mon Sep 17 00:00:00 2001 From: Alejandro Oria Date: Sun, 23 May 2021 20:42:37 +0200 Subject: [PATCH 1/2] Fix typo on readme sample code and make HoverItem image optional Sample code referred to "image" field as "icon". Also, changed HoverItem specification to take image as an optional value. --- Hover/Model/HoverItem.swift | 4 ++-- README.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Hover/Model/HoverItem.swift b/Hover/Model/HoverItem.swift index 1678f44..9bfc0b9 100644 --- a/Hover/Model/HoverItem.swift +++ b/Hover/Model/HoverItem.swift @@ -13,11 +13,11 @@ public struct HoverItem { // MARK: Properties let title: String? - let image: UIImage + let image: UIImage? let onTap: () -> () // MARK: Lifecycle - public init(title: String? = nil, image: UIImage, onTap: @escaping () -> ()) { + public init(title: String? = nil, image: UIImage?, onTap: @escaping () -> ()) { self.title = title self.image = image self.onTap = onTap diff --git a/README.md b/README.md index 6296518..434cff9 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ Once imported, you can start using **Hover** like follows: ```swift // Create Hover's Configuration (all parameters have defaults) -let configuration = HoverConfiguration(icon: UIImage(named: "add"), color: .gradient(top: .blue, bottom: .cyan)) +let configuration = HoverConfiguration(image: UIImage(named: "add"), color: .gradient(top: .blue, bottom: .cyan)) // Create the items to display let items = [ From 6a82bda8946cf20ab16dab37fdce522bf508a618 Mon Sep 17 00:00:00 2001 From: Alejandro Oria Date: Mon, 24 May 2021 12:39:33 +0200 Subject: [PATCH 2/2] Update Podspec version to 1.3.2 --- Hover.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Hover.podspec b/Hover.podspec index 7c9203f..6d77c0c 100644 --- a/Hover.podspec +++ b/Hover.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = 'Hover' - spec.version = '1.3.1' + spec.version = '1.3.2' spec.license = { :type => 'MIT', :file => 'LICENSE' } spec.homepage = 'https://github.com/pedrommcarrasco/Hover' spec.authors = { 'Pedro Carrasco' => 'https://twitter.com/pedrommcarrasco' }