Skip to content

Commit

Permalink
Merge pull request #14 from alejandro-oria/typos
Browse files Browse the repository at this point in the history
Fix typo on readme sample code and make HoverItem image optional
  • Loading branch information
pedrommcarrasco authored May 27, 2021
2 parents 08ccb08 + 6a82bda commit 37c8a5c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Hover.podspec
Original file line number Diff line number Diff line change
@@ -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' }
Expand Down
4 changes: 2 additions & 2 deletions Hover/Model/HoverItem.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down

0 comments on commit 37c8a5c

Please sign in to comment.