Visualize pattern on UITextField
up vote
0
down vote
favorite
My goal is to create a text field that matches this picture:
Core idea is that:
- User can't edit pattern symbols (i.e. place cursor there)
- Pattern symbols get replaced and disappear as the user types
- There are static pattern symbols (i.e. '-')
Is there a drop-in solution for such things? I've searched over GitHub and there are a lot of libs that do UITextField formatting, but they usually just add symbols and it doesn't actually feel like a placeholder that guides user how to type.
Any suggestions?
ios uitextfield uikit
add a comment |
up vote
0
down vote
favorite
My goal is to create a text field that matches this picture:
Core idea is that:
- User can't edit pattern symbols (i.e. place cursor there)
- Pattern symbols get replaced and disappear as the user types
- There are static pattern symbols (i.e. '-')
Is there a drop-in solution for such things? I've searched over GitHub and there are a lot of libs that do UITextField formatting, but they usually just add symbols and it doesn't actually feel like a placeholder that guides user how to type.
Any suggestions?
ios uitextfield uikit
What have you tried so far?
– Carpsen90
Nov 10 at 20:15
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
My goal is to create a text field that matches this picture:
Core idea is that:
- User can't edit pattern symbols (i.e. place cursor there)
- Pattern symbols get replaced and disappear as the user types
- There are static pattern symbols (i.e. '-')
Is there a drop-in solution for such things? I've searched over GitHub and there are a lot of libs that do UITextField formatting, but they usually just add symbols and it doesn't actually feel like a placeholder that guides user how to type.
Any suggestions?
ios uitextfield uikit
My goal is to create a text field that matches this picture:
Core idea is that:
- User can't edit pattern symbols (i.e. place cursor there)
- Pattern symbols get replaced and disappear as the user types
- There are static pattern symbols (i.e. '-')
Is there a drop-in solution for such things? I've searched over GitHub and there are a lot of libs that do UITextField formatting, but they usually just add symbols and it doesn't actually feel like a placeholder that guides user how to type.
Any suggestions?
ios uitextfield uikit
ios uitextfield uikit
edited Nov 10 at 20:52
rmaddy
235k27306372
235k27306372
asked Nov 10 at 19:49
s1ddok
3,63611022
3,63611022
What have you tried so far?
– Carpsen90
Nov 10 at 20:15
add a comment |
What have you tried so far?
– Carpsen90
Nov 10 at 20:15
What have you tried so far?
– Carpsen90
Nov 10 at 20:15
What have you tried so far?
– Carpsen90
Nov 10 at 20:15
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
If you want Xs to disappear and be replaced by digits one by one (and not by whole four-digit groups), you should add not four (as Robert Dresler suggests), but sixteen UITextField
s with X placeholder in each of them.
Make the cursor jump to the next field once the current one is filled, and also make it jump to the first field that’s not filled when the user taps on any of the fields (to prevent inputting digits in random positions).
Oh, and what do I do when user removes character? I hove to kinda move everything from next text fields?
– s1ddok
Nov 11 at 7:46
Yes, when the user deletes a character, you should move the cursor to the previous text field. I believe you can use thetextField(_:shouldChangeCharactersIn:replacementString:)
delegate method for detecting when the user types or deletes characters.
– Yakov M.
Nov 11 at 12:01
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
If you want Xs to disappear and be replaced by digits one by one (and not by whole four-digit groups), you should add not four (as Robert Dresler suggests), but sixteen UITextField
s with X placeholder in each of them.
Make the cursor jump to the next field once the current one is filled, and also make it jump to the first field that’s not filled when the user taps on any of the fields (to prevent inputting digits in random positions).
Oh, and what do I do when user removes character? I hove to kinda move everything from next text fields?
– s1ddok
Nov 11 at 7:46
Yes, when the user deletes a character, you should move the cursor to the previous text field. I believe you can use thetextField(_:shouldChangeCharactersIn:replacementString:)
delegate method for detecting when the user types or deletes characters.
– Yakov M.
Nov 11 at 12:01
add a comment |
up vote
0
down vote
If you want Xs to disappear and be replaced by digits one by one (and not by whole four-digit groups), you should add not four (as Robert Dresler suggests), but sixteen UITextField
s with X placeholder in each of them.
Make the cursor jump to the next field once the current one is filled, and also make it jump to the first field that’s not filled when the user taps on any of the fields (to prevent inputting digits in random positions).
Oh, and what do I do when user removes character? I hove to kinda move everything from next text fields?
– s1ddok
Nov 11 at 7:46
Yes, when the user deletes a character, you should move the cursor to the previous text field. I believe you can use thetextField(_:shouldChangeCharactersIn:replacementString:)
delegate method for detecting when the user types or deletes characters.
– Yakov M.
Nov 11 at 12:01
add a comment |
up vote
0
down vote
up vote
0
down vote
If you want Xs to disappear and be replaced by digits one by one (and not by whole four-digit groups), you should add not four (as Robert Dresler suggests), but sixteen UITextField
s with X placeholder in each of them.
Make the cursor jump to the next field once the current one is filled, and also make it jump to the first field that’s not filled when the user taps on any of the fields (to prevent inputting digits in random positions).
If you want Xs to disappear and be replaced by digits one by one (and not by whole four-digit groups), you should add not four (as Robert Dresler suggests), but sixteen UITextField
s with X placeholder in each of them.
Make the cursor jump to the next field once the current one is filled, and also make it jump to the first field that’s not filled when the user taps on any of the fields (to prevent inputting digits in random positions).
edited Nov 10 at 22:15
answered Nov 10 at 22:09
Yakov M.
165
165
Oh, and what do I do when user removes character? I hove to kinda move everything from next text fields?
– s1ddok
Nov 11 at 7:46
Yes, when the user deletes a character, you should move the cursor to the previous text field. I believe you can use thetextField(_:shouldChangeCharactersIn:replacementString:)
delegate method for detecting when the user types or deletes characters.
– Yakov M.
Nov 11 at 12:01
add a comment |
Oh, and what do I do when user removes character? I hove to kinda move everything from next text fields?
– s1ddok
Nov 11 at 7:46
Yes, when the user deletes a character, you should move the cursor to the previous text field. I believe you can use thetextField(_:shouldChangeCharactersIn:replacementString:)
delegate method for detecting when the user types or deletes characters.
– Yakov M.
Nov 11 at 12:01
Oh, and what do I do when user removes character? I hove to kinda move everything from next text fields?
– s1ddok
Nov 11 at 7:46
Oh, and what do I do when user removes character? I hove to kinda move everything from next text fields?
– s1ddok
Nov 11 at 7:46
Yes, when the user deletes a character, you should move the cursor to the previous text field. I believe you can use the
textField(_:shouldChangeCharactersIn:replacementString:)
delegate method for detecting when the user types or deletes characters.– Yakov M.
Nov 11 at 12:01
Yes, when the user deletes a character, you should move the cursor to the previous text field. I believe you can use the
textField(_:shouldChangeCharactersIn:replacementString:)
delegate method for detecting when the user types or deletes characters.– Yakov M.
Nov 11 at 12:01
add a comment |
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53242793%2fvisualize-pattern-on-uitextfield%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
What have you tried so far?
– Carpsen90
Nov 10 at 20:15