-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fixed styling modifiers to work only with attributes - Added textColor modifier - Improved documentation - Added initializers with Foundation.Formatter support
- Loading branch information
1 parent
85905bc
commit b951ea4
Showing
10 changed files
with
364 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
Sources/SwiftUITextField/TextField/DefaultAttributesMergePolicy.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// | ||
// DefaultAttributesMergePolicy.swift | ||
// | ||
// | ||
// Created by Rico Crescenzio on 13/04/22. | ||
// | ||
|
||
/// Used in ``SUITextField/uiTextFieldDefaultTextAttributes(_:mergePolicy:)`` | ||
/// to tell the modifier how to apply new attributes. | ||
public enum DefaultAttributesMergePolicy { | ||
|
||
/// When two dict of attributes contains same key, old value is kept. | ||
case keepOld | ||
|
||
/// When two dict of attributes contains same key, new value is kept. | ||
case keepNew | ||
|
||
/// The old dict of attributes is completely removed in place of the new one. | ||
case rewriteAll | ||
} |
Oops, something went wrong.