SwiftUI Tag TextField - TagsField - iOS 17 - Xcode 15
🕑 Added 2023-09-13 20:25:42 +0000 UTCSource Code For SwiftUI Tag TextField - TagsField - iOS 17 - Xcode 15.
Download Code 👇
Comments
Ben Izadi
Precious content, thank you
Stavros Pachoundakis
@Sammy O , you can try something like this .onAppear(perform: { /// Initializing Tag View if tags.isEmpty { Task { tags.append(.init(value: "", isInitial: true)) } } }) .onReceive(NotificationCenter.default.publisher(for: UIResponder.keyboardWillHideNotification), perform: { _ in if let lastTag = tags.last, !lastTag.value.isEmpty { /// Inserting empty tag at last Task { tags.append(.init(value: "", isInitial: true)) } } })
Sammy O
I got "Modifying state during view update, this will cause undefined behavior." on line (@Binding var tags: [Tag]). Anyone have the same ?
Andrej
Amazing achievement ...👍