Use a Segmented Picker To Switch @FocusState Between Text Fields
Daily Coding Tip 125

Tested on Xcode Version 14.0 beta 2 (14A5229c).
I was previously using a Boolean value as a FocusState in a recent Daily Coding Tip, but this time I want to use a custom type. This is a simple enum called FocusedField with two possible values, text1 and text2.
Although I can use this as my FocusState, I can’t use it lik…
Keep reading with a 7-day free trial
Subscribe to Type Safely to keep reading this post and get 7 days of free access to the full post archives.

