IOS SwiftUI : How to make verification screen with write one value only and move to next بالعربي
Github code link : https://github.com/AyaBaghdadi/swiftUI_verfication_code_one_no.git
Firstly note this code of Swift UI provided in @available(iOS 15.0, *)
About how to use it follow this steps :
1️⃣ install framework pod 'Introspect'
2️⃣ import Introspect in your viewController
3️⃣ Add the variables you want depend on your logic like
@State var number1: String = ""
4️⃣ Add enum on it all your variable
enum Field {
case number1
}
5️⃣ Add var @FocusState of Type of your enum field like
@FocusState private var focusedField: Field?
6️⃣ Define each TextField design and on each it add
.focused($focusedField, equals: . number1)
.onChange(of: number1) { newValue in
if newValue.count == 1 {
focusedField = . number2
}
}
every Textfield refer to the next field & count for detect user write one number only in one filed
Видео IOS SwiftUI : How to make verification screen with write one value only and move to next بالعربي канала Technicalisto FCI
Firstly note this code of Swift UI provided in @available(iOS 15.0, *)
About how to use it follow this steps :
1️⃣ install framework pod 'Introspect'
2️⃣ import Introspect in your viewController
3️⃣ Add the variables you want depend on your logic like
@State var number1: String = ""
4️⃣ Add enum on it all your variable
enum Field {
case number1
}
5️⃣ Add var @FocusState of Type of your enum field like
@FocusState private var focusedField: Field?
6️⃣ Define each TextField design and on each it add
.focused($focusedField, equals: . number1)
.onChange(of: number1) { newValue in
if newValue.count == 1 {
focusedField = . number2
}
}
every Textfield refer to the next field & count for detect user write one number only in one filed
Видео IOS SwiftUI : How to make verification screen with write one value only and move to next بالعربي канала Technicalisto FCI
Комментарии отсутствуют
Информация о видео
4 мая 2022 г. 1:09:31
00:05:29
Другие видео канала