-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c567b4b
commit 9e84319
Showing
9 changed files
with
127 additions
and
29 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
29 changes: 29 additions & 0 deletions
29
Projects/DesignSystem/DesignCore/Sources/FlatTextFieldOption.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,29 @@ | ||
// | ||
// FlatTextFieldOption.swift | ||
// DesignCore | ||
// | ||
// Created by 김지수 on 11/14/24. | ||
// Copyright © 2024 com.weave. All rights reserved. | ||
// | ||
|
||
import SwiftUI | ||
|
||
struct FlatTextFieldOptionModifier: ViewModifier { | ||
let keyboardType: UIKeyboardType | ||
|
||
func body(content: Content) -> some View { | ||
content | ||
.keyboardType(keyboardType) | ||
.interactiveDismissDisabled() | ||
.textInputAutocapitalization(.never) | ||
.autocorrectionDisabled() | ||
.speechAnnouncementsQueued(false) | ||
.speechSpellsOutCharacters(false) | ||
} | ||
} | ||
|
||
extension View { | ||
public func flatTextFieldOption(keyboardType: UIKeyboardType = .default) -> some View { | ||
modifier(FlatTextFieldOptionModifier(keyboardType: keyboardType)) | ||
} | ||
} |
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
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