diff --git a/CHANGELOG.md b/CHANGELOG.md index a0fa931f..fb7ec37b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +### 0.9.11 +- **[Breaking change]**: Renamed `NumberFormat`'s `allOptions` to `allCases` +- **Fix**: Closure syntax fix. New closure naming. +- **Fix**: Added missing `BasePlaceholderView` protocol function. + ### 0.9.10 - **Remove**: Removed unused scheme & target - **Remove**: Cocoapods deintegrated diff --git a/LeadKit.podspec b/LeadKit.podspec index 79a14220..b9217b30 100644 --- a/LeadKit.podspec +++ b/LeadKit.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "LeadKit" - s.version = "0.9.10" + s.version = "0.9.11" s.summary = "iOS framework with a bunch of tools for rapid development" s.homepage = "https://github.com/TouchInstinct/LeadKit" s.license = "Apache License, Version 2.0" diff --git a/Sources/Classes/Views/BasePlaceholderView/BasePlaceholerView.swift b/Sources/Classes/Views/BasePlaceholderView/BasePlaceholerView.swift index 479b9ce2..3e5e77d9 100644 --- a/Sources/Classes/Views/BasePlaceholderView/BasePlaceholerView.swift +++ b/Sources/Classes/Views/BasePlaceholderView/BasePlaceholerView.swift @@ -75,6 +75,10 @@ open class BasePlaceholderView: UIView, InitializableView { open func localize() { // override in subclass } + + open func configureLayout() { + // override in subclass + } } public extension BasePlaceholderView { diff --git a/Sources/Extensions/NumberFormattingService/NumberFormattingService+DefaultImplementation.swift b/Sources/Extensions/NumberFormattingService/NumberFormattingService+DefaultImplementation.swift index 8908bf2e..e8302f51 100644 --- a/Sources/Extensions/NumberFormattingService/NumberFormattingService+DefaultImplementation.swift +++ b/Sources/Extensions/NumberFormattingService/NumberFormattingService+DefaultImplementation.swift @@ -26,7 +26,7 @@ public extension NumberFormattingService { /// Computed static property. Use only once for `formatters` field implementation! static var computedFormatters: [NumberFormatType: NumberFormatter] { - return Dictionary(uniqueKeysWithValues: NumberFormatType.allOptions.map { ($0, $0.numberFormatter) }) + return Dictionary(uniqueKeysWithValues: NumberFormatType.allCases.map { ($0, $0.numberFormatter) }) } func numberFormatter(for format: NumberFormatType) -> NumberFormatter { diff --git a/Sources/Functions/Block.swift b/Sources/Functions/Block.swift index 06d3620e..98c2e15f 100644 --- a/Sources/Functions/Block.swift +++ b/Sources/Functions/Block.swift @@ -21,19 +21,19 @@ // /// Closure with custom arguments and return value. -public typealias Block = (Input) -> Output +public typealias Closure = (Input) -> Output /// Closure with no arguments and custom return value. -public typealias ResultBlock = Block +public typealias ResultClosure = () -> Output /// Closure that takes custom arguments and returns Void. -public typealias ParameterBlock = Block +public typealias ParameterClosure = Closure /// Closure that takes no arguments and returns Void. -public typealias VoidBlock = ResultBlock +public typealias VoidBlock = ResultClosure /// Closure with custom arguments and return value, may throw an error. -public typealias ThrowableBlock = (Input) throws -> Output +public typealias ThrowableClosure = (Input) throws -> Output /// Closure that takes no arguments, may throw an error and returns Void. public typealias ThrowableVoidBlock = () throws -> Void diff --git a/Sources/Info-iOS.plist b/Sources/Info-iOS.plist index 4675ccda..968be549 100644 --- a/Sources/Info-iOS.plist +++ b/Sources/Info-iOS.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 0.9.10 + 0.9.11 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass diff --git a/Sources/Info-tvOS.plist b/Sources/Info-tvOS.plist index 4675ccda..968be549 100644 --- a/Sources/Info-tvOS.plist +++ b/Sources/Info-tvOS.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 0.9.10 + 0.9.11 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass diff --git a/Sources/Info-watchOS.plist b/Sources/Info-watchOS.plist index 4675ccda..968be549 100644 --- a/Sources/Info-watchOS.plist +++ b/Sources/Info-watchOS.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 0.9.10 + 0.9.11 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass diff --git a/Sources/Protocols/NumberFormattingService/NumberFormat.swift b/Sources/Protocols/NumberFormattingService/NumberFormat.swift index 91ced382..818eb65a 100644 --- a/Sources/Protocols/NumberFormattingService/NumberFormat.swift +++ b/Sources/Protocols/NumberFormattingService/NumberFormat.swift @@ -23,10 +23,7 @@ import Foundation /// Protocol for describing number format. -public protocol NumberFormat: Hashable { - - /// All available options. - static var allOptions: [Self] { get } +public protocol NumberFormat: Hashable, CaseIterable { /// A NumberFormatter instance for this format. var numberFormatter: NumberFormatter { get }