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)