From bb6f490bcdfdaf417efcc0b58c273ba9567df79b Mon Sep 17 00:00:00 2001 From: JGZ_YES Date: Wed, 12 Aug 2026 13:32:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D:=20ContentView=20=E7=BC=BA?= =?UTF-8?q?=E5=B0=91=20import=20UIKit=EF=BC=8CFriendControlView=20?= =?UTF-8?q?=E7=A7=BB=E9=99=A4=E4=B8=8D=E5=85=BC=E5=AE=B9=E7=9A=84=20autoca?= =?UTF-8?q?pitalization=EF=BC=8C=E6=94=B9=E7=94=A8=20textCase(.uppercase)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AreYouSleeping/Views/ContentView.swift | 1 + AreYouSleeping/Views/FriendControlView.swift | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/AreYouSleeping/Views/ContentView.swift b/AreYouSleeping/Views/ContentView.swift index 54da8cd..2806a0e 100644 --- a/AreYouSleeping/Views/ContentView.swift +++ b/AreYouSleeping/Views/ContentView.swift @@ -1,4 +1,5 @@ import SwiftUI +import UIKit struct ContentView: View { @EnvironmentObject var store: Store diff --git a/AreYouSleeping/Views/FriendControlView.swift b/AreYouSleeping/Views/FriendControlView.swift index eef4377..9468d44 100644 --- a/AreYouSleeping/Views/FriendControlView.swift +++ b/AreYouSleeping/Views/FriendControlView.swift @@ -12,8 +12,8 @@ struct FriendControlView: View { Section { HStack { TextField("输入朋友的控制码", text: $friendCode) - .autocapitalization(.allCharacters) .disableAutocorrection(true) + .textCase(.uppercase) Button("查询") { lookupFriend() } .buttonStyle(.borderedProminent) .controlSize(.small)