Skip to content

Commit fbb17f6

Browse files
taflanidiJeorge Taflanidi
andauthored
7.0.0 (#100)
* Cleanup * Update logo * Set main view colour to system background * Add basic SwiftUI support * Update package revision * Wire up isEditing binding * Manage first responder * Update deps * Add onSubmit and onFocus accessory methods * Manage first responder, p.2 * Incorporate env attributes * Cleanup * Add PhoneInputListener * Update CHANGELOG * Add a basic UI test * Prepare for SPI * Update docs & cleanup * Compute tail placeholder * Make a custom UITextField background * Update CHANGELOG, cleanup --------- Co-authored-by: Jeorge Taflanidi <[email protected]>
1 parent 40e33ad commit fbb17f6

File tree

42 files changed

+3089
-306
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+3089
-306
lines changed

.spi.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
version: 1
2+
builder:
3+
configs:
4+
- documentation_targets: [InputMask]
5+
platform: ios

.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1420"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "InputMask"
18+
BuildableName = "InputMask"
19+
BlueprintName = "InputMask"
20+
ReferencedContainer = "container:">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
<BuildActionEntry
24+
buildForTesting = "YES"
25+
buildForRunning = "YES"
26+
buildForProfiling = "NO"
27+
buildForArchiving = "NO"
28+
buildForAnalyzing = "YES">
29+
<BuildableReference
30+
BuildableIdentifier = "primary"
31+
BlueprintIdentifier = "InputMaskTests"
32+
BuildableName = "InputMaskTests"
33+
BlueprintName = "InputMaskTests"
34+
ReferencedContainer = "container:">
35+
</BuildableReference>
36+
</BuildActionEntry>
37+
</BuildActionEntries>
38+
</BuildAction>
39+
<TestAction
40+
buildConfiguration = "Debug"
41+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
42+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
43+
shouldUseLaunchSchemeArgsEnv = "YES">
44+
<Testables>
45+
<TestableReference
46+
skipped = "NO">
47+
<BuildableReference
48+
BuildableIdentifier = "primary"
49+
BlueprintIdentifier = "InputMaskTests"
50+
BuildableName = "InputMaskTests"
51+
BlueprintName = "InputMaskTests"
52+
ReferencedContainer = "container:">
53+
</BuildableReference>
54+
</TestableReference>
55+
</Testables>
56+
</TestAction>
57+
<LaunchAction
58+
buildConfiguration = "Debug"
59+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
60+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
61+
launchStyle = "0"
62+
useCustomWorkingDirectory = "NO"
63+
ignoresPersistentStateOnLaunch = "NO"
64+
debugDocumentVersioning = "YES"
65+
debugServiceExtension = "internal"
66+
allowLocationSimulation = "YES">
67+
</LaunchAction>
68+
<ProfileAction
69+
buildConfiguration = "Release"
70+
shouldUseLaunchSchemeArgsEnv = "YES"
71+
savedToolIdentifier = ""
72+
useCustomWorkingDirectory = "NO"
73+
debugDocumentVersioning = "YES">
74+
<MacroExpansion>
75+
<BuildableReference
76+
BuildableIdentifier = "primary"
77+
BlueprintIdentifier = "InputMask"
78+
BuildableName = "InputMask"
79+
BlueprintName = "InputMask"
80+
ReferencedContainer = "container:">
81+
</BuildableReference>
82+
</MacroExpansion>
83+
</ProfileAction>
84+
<AnalyzeAction
85+
buildConfiguration = "Debug">
86+
</AnalyzeAction>
87+
<ArchiveAction
88+
buildConfiguration = "Release"
89+
revealArchiveInOrganizer = "YES">
90+
</ArchiveAction>
91+
</Scheme>

CHANGELOG.md

Lines changed: 46 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,63 @@
1-
# Changelog
1+
# 𝌡Changelog
22

3-
### `6.1.0`
3+
## 7.0.0
44

5-
##### Added:
5+
**⤵️ Added:**
66

7-
* iOS suggestions support
7+
* New logo :D
8+
* New README :D
9+
* A basic UI test in the **Sample** project for the date/phone fields
10+
* `"".extractDigits()`: a helper method to extract digits from a `String`
11+
* `"".boxSizeWithFont(font)`: a helper method to calculate a rectangle size for a `String`
12+
* Text listener callbacks now return a `tailPlaceholder` for the value to be completed
13+
* `Country`: a model object representing a country with phone formatting, ISO codes & emojis
14+
* `Country.all`: a dictionary of known countries
15+
* `MaskedTextField`: a SwiftUI `TextField` with an attached mask
16+
* A SwiftUI sample project
17+
* `PhoneInputListener`: a `MaskedTextInputListener` allowing to enter a phone number of any known country
818

9-
### `6.0.0`
19+
**⤴️ Removed:**
1020

11-
#### Removed:
21+
* `UITextField.cursorPosition`: please use a `UITextInput.caretPosition` property instead
22+
* `UITextView.cursorPosition`: please use a `UITextInput.caretPosition` property instead
1223

13-
* `Mask::apply()`, the `autocomplete` flag
24+
**🔄 Modified:**
1425

15-
This flag is now a part of the `CaretGravity.forward` enum case.
26+
* `swift-tools-version``5.7.1`
27+
* Pod platform → `16.1`
1628

17-
#### Added:
29+
## 6.1.0
1830

19-
* `CaretGravity.forward`, the `autocomplete` flag
20-
* `CaretGravity.backward`, the [`autoskip`](https://github.com/RedMadRobot/input-mask-ios/wiki/0.-Mask#autoskip-flag) flag
31+
**⤵️ Added:**
32+
33+
* iOS text suggestions support (see [`UITextContentType`](https://developer.apple.com/documentation/uikit/uitextcontenttype))
34+
35+
## 6.0.0
2136

22-
### `5.0.0`
37+
**⤴️ Removed:**
2338

24-
#### Removed:
39+
* `Mask::apply()`, the `autocomplete` flag (this flag is now a part of the `CaretGravity.forward` enum case)
40+
41+
**⤵️ Added:**
42+
43+
* `CaretGravity.forward`, the `autocomplete` flag
44+
* `CaretGravity.backward`, the [`autoskip`](https://github.com/RedMadRobot/input-mask-ios/wiki/0.-Mask#autoskip-flag) flag
2545

26-
* `CaretStringIterator::beforeCaret()`
46+
## 5.0.0
2747

28-
This method is now replaced with `::insertionAffectsCaret()` and `::deletionAffectsCaret()` calls.
48+
**⤴️ Removed:**
2949

30-
* `::deleteText()` and `::modifyText()` in `MaskedTextFieldDelegate`, `MaskedTextInputListener` and `MaskedTextViewDelegate`
50+
* `CaretStringIterator::beforeCaret()` (this method is now replaced with `::insertionAffectsCaret()` and `::deletionAffectsCaret()` calls)
3151

32-
These methods had been refactored and merged.
52+
* `::deleteText()` and `::modifyText()` in `MaskedTextFieldDelegate`, `MaskedTextInputListener` and `MaskedTextViewDelegate` (these methods had been refactored and merged)
3353

3454
Please, consider overriding corresponding
3555
`textField(:shouldChangeCharactersIn:replacementString:)`
3656
`textInput(:isChangingCharactersIn:replacementString:)` or
3757
`textView(:shouldChangeTextIn:replacementText:)`
3858
instead.
3959

40-
#### Added:
60+
**⤵️ Added:**
4161

4262
* `CaretString` instances now contain caret gravity.
4363

@@ -49,30 +69,30 @@ Default `CaretGravity` is `.forward`. Set caret gravity to `.backward` only when
4969

5070
These methods allow to incorporate new caret gravity setting. `RTLCaretStringIterator` had also been rewritten to reflect these changes.
5171

52-
#### Modified:
72+
**🔄 Modified:**
5373

5474
* [Atomic cursor movement](https://github.com/RedMadRobot/input-mask-ios/wiki/2.-Text-Field-Listener#atomic-cursor-movement-an-ugly-workaround-property) is now turned off by default.
5575

56-
### `4.3.0`
76+
## 4.3.0
5777

58-
#### Added:
78+
**⤵️ Added:**
5979

6080
* `AffinityCalculationStrategy.extractedValueCapacity` option allowing to have radically different mask format depending on the extracted value length
6181

62-
### `4.2.0`
82+
## 4.2.0
6383

64-
#### Added:
84+
**⤵️ Added:**
6585

6686
* `AffinityCalculationStrategy.capacity` option allowing to have radically different mask format depending on the input length
6787

68-
### `4.1.0`
88+
## 4.1.0
6989

70-
#### Added:
90+
**⤵️ Added:**
7191

7292
* `Mask.isValid(format:customNotations:)` method for format checks
7393
* `MaskedTextFieldDelegate.atomicCursorMovement` and `MaskedTextInputListener.atomicCaretMovement` properties in order to address issue [#32](https://github.com/RedMadRobot/input-mask-ios/issues/32)
7494

75-
#### Fixed:
95+
**↩️ Fixed:**
7696

7797
* Optional blocks of symbols are now ignored when extracted value completeness is calculated
7898
* `textFieldDidEndEditing` delegate method not called

Documentation/Assets/logo.png

11.4 KB
Loading

Documentation/Assets/logo.xcf

30.4 KB
Binary file not shown.

InputMask.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
Pod::Spec.new do |spec|
22
spec.name = "InputMask"
3-
spec.version = "6.1.0"
3+
spec.version = "7.0.0"
44
spec.summary = "InputMask"
55
spec.description = "User input masking library."
66
spec.homepage = "https://github.com/RedMadRobot/input-mask-ios"
77
spec.license = "MIT"
88
spec.author = { "Egor Taflanidi" => "[email protected]" }
99
spec.source = { :git => "https://github.com/RedMadRobot/input-mask-ios.git", :tag => spec.version.to_s }
10-
spec.platform = :ios, "8.0"
10+
spec.platform = :ios, "16.1"
1111
spec.requires_arc = true
1212
spec.source_files = "Source/InputMask/InputMask/Classes/**/*"
1313
end

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2016 Redmadrobot
3+
Copyright (c) 2023 YEHOR TAFLANIDI
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:4.1
1+
// swift-tools-version: 5.7.1
22

33
import PackageDescription
44

0 commit comments

Comments
 (0)