I'm working on profile user level, and I noticed in different apps the fact they can do what I'm going to explain below :
From profile page the new user tape on a button : username
they go to another page to choose a username
after that they go to choose password
once everything it's done they comeback to profile page
I want make the initial button username --> username textfield once the operation it's done
Thanks
Check conditions when a user has already entered his name then hide your button and when user has not entered username then hide text field. You can hide the button by using button.hidden = true and make it false if you want to show your button or a text field.
Related
I'm implementing search function on my project. I have three text boxes and a search button
Fist Name
Second Name
Age
Search button generate search on another result page. The problem is that, when I click back button from the result page, Then the Age text box filled with first Name data which I enter previously and first name field remains empty. How did it happen.
I have a UI that includes a password entry field and a show/hide button. A tester has pointed out the following inconsistent behaviour.
If the password is hidden and half typed in (e.g. "abc") and the user hits the toggle button to show the password and continues typing then the new characters (e.g. "def") are added to the end of the initial entry (making "abcdef"). All well and good.
However, if the password is shown and half typed in (e.g. "abc") and the user hits the toggle button to hide the password and continues typing then the new characters (e.g. "def") replace the initial entry (making "def"). So the show/hide toggle not only shows or hides the text but also changes the behaviour of the UITextField (append / clear and start over) when the next character is entered.
Why is this happening?
Correct it is normal behaviour of UITextField and you can fix this using:
textField.clearsOnBeginEditing = NO;
Or in Swift:
textField.clearsOnBeginEditing = false
But it will not work if you use secure text for password.
See One of the answer:
Secure UITextField Answer
you can realization the effect you want by change your mind.
you can init a NSString *pwd to store the user's password, when user del or replace password , you change your pwd value, make sure your pwd always equal to user's typed password.
when user click the toggle button,you show the pwd value on the textfield.
I've been developing a programming where the user can select a list of fields from popup buttons, then they press a calculate button and then depending on the choices, a string of text gets outputted to a UIText Field.
However I would like for the text field to be cleared when the user starts selecting other choices in the popup button before pressing the select button.
Is there anyway this is possible?
Just right this code in the place where that happens:
/*You can replace theTextFieldYouAreTalkingAbout with the one you are talking about*/
theTextFieldYouAreTalkingAbout.text = ""
I have figured out how to manipulate what the Return key does on the popup keyboard via the KeyDown event, but I would like to edit the label on this key, too. For example, working with an app on a log-on page:
I would ideally like to have that the Return key of the user-name text box say "Next," and then for the password text box, the Return key will say "Log in." Pressing it will log them in instead of just dismissing the keyboard, so they don't have to press the log-in button on the form.
IOS xcode, in my root.plist i have 3 text fields. The user is able to change the strings for these fields which then saves in the nsUserDefault. While in the app settings page if the user click on the field to edit it the keyboard pops up. when they hit return focus moves to the next text field. Moving the focus off the text fields does not resignFirstResponder.
Since this is the Apple Settings page I don't have a way to assign view controller to create my method to resign the keyboard.
How do I resignFirstResponder from the app setting page.
you won't be able to do that...settings is a native *iOS* app..apple does not provide return in the text fields there..user has to navigate back...to hide the keyboard