commit
29de30cd37
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -75,6 +75,10 @@ open class BasePlaceholderView: UIView, InitializableView {
|
|||
open func localize() {
|
||||
// override in subclass
|
||||
}
|
||||
|
||||
open func configureLayout() {
|
||||
// override in subclass
|
||||
}
|
||||
}
|
||||
|
||||
public extension BasePlaceholderView {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -21,19 +21,19 @@
|
|||
//
|
||||
|
||||
/// Closure with custom arguments and return value.
|
||||
public typealias Block<Input, Output> = (Input) -> Output
|
||||
public typealias Closure<Input, Output> = (Input) -> Output
|
||||
|
||||
/// Closure with no arguments and custom return value.
|
||||
public typealias ResultBlock<Output> = Block<Void, Output>
|
||||
public typealias ResultClosure<Output> = () -> Output
|
||||
|
||||
/// Closure that takes custom arguments and returns Void.
|
||||
public typealias ParameterBlock<Input> = Block<Input, Void>
|
||||
public typealias ParameterClosure<Input> = Closure<Input, Void>
|
||||
|
||||
/// Closure that takes no arguments and returns Void.
|
||||
public typealias VoidBlock = ResultBlock<Void>
|
||||
public typealias VoidBlock = ResultClosure<Void>
|
||||
|
||||
/// Closure with custom arguments and return value, may throw an error.
|
||||
public typealias ThrowableBlock<Input, Output> = (Input) throws -> Output
|
||||
public typealias ThrowableClosure<Input, Output> = (Input) throws -> Output
|
||||
|
||||
/// Closure that takes no arguments, may throw an error and returns Void.
|
||||
public typealias ThrowableVoidBlock = () throws -> Void
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.9.10</string>
|
||||
<string>0.9.11</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.9.10</string>
|
||||
<string>0.9.11</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.9.10</string>
|
||||
<string>0.9.11</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
|
|
|
|||
|
|
@ -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 }
|
||||
|
|
|
|||
Loading…
Reference in New Issue