Skip to content

Commit

Permalink
Added public init for FormattedTextValue. Updated version to 2.0.5.
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksandr.orlov committed Sep 7, 2020
1 parent 4a9bed9 commit 429cf60
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion AnyFormatKit.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'AnyFormatKit'
s.version = '2.0.4'
s.version = '2.0.5'
s.summary = 'Simple text formatting in Swift.'

s.description = <<-DESC
Expand Down
4 changes: 2 additions & 2 deletions AnyFormatKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,7 @@
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 2.0.4;
MARKETING_VERSION = 2.0.5;
PRODUCT_BUNDLE_IDENTIFIER = Brander.AnyFormatKit;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
Expand All @@ -906,7 +906,7 @@
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 2.0.4;
MARKETING_VERSION = 2.0.5;
PRODUCT_BUNDLE_IDENTIFIER = Brander.AnyFormatKit;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ open class DefaultTextInputFormatter: DefaultTextFormatter, TextInputFormatter {
super.init(textPattern: textPattern, patternSymbol: patternSymbol)
}

// MARK: - open
// MARK: - Format input

open func formatInput(currentText: String, range: NSRange, replacementString text: String) -> FormattedTextValue {
let unformattedRange = self.unformattedRange(from: range)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ import Foundation
public struct FormattedTextValue: Equatable {
public let formattedText: String
public let caretBeginOffset: Int

public init(formattedText: String, caretBeginOffset: Int) {
self.formattedText = formattedText
self.caretBeginOffset = caretBeginOffset
}
}

/// Interface for formatter of TextInput, that allow change format of text during input
Expand Down

0 comments on commit 429cf60

Please sign in to comment.