how to change colour of the text entered in label as we enter the desired regular expression in password text field? - objective-c

I am new to objective C and I dont know if this can be done without any library or not but if yes kindly let me know...
I have a view in which I have added a button & textfield with some character like "A b # 1 6". Here I need to change the color of characters as I enter the password.
I mean to say when I enter T color or 'A' changes, p is pressed 'b' color changes and so on if I enter special character that color changes and minimum lenth is 6 so when I enter 6 character color of 6 changes.
I tried it with using regular expression but i need this functionality.
for refrence I am adding Image.
I have updated my code instead of labels I have taken Buttons to show the changes. Here is my code:
Now I want to know when user delete character from textfield the color should get back to normal color. I mean if user deletes "A" then button roundButtonCapital should change to normal button.
I hope I am clear. Please let me know if any doubt.
https://drive.google.com/file/d/0B3EymICOjqeNM01zcEQ4eUN0eUk/view?usp=sharing

Now I want to know when user delete character from textfield the color should get back to normal color.
At a guess when checking the user input you are only setting the color if the particular condition - uppercase, length, etc. - is met. You should always set the color, to the "passed" color if the condition is met and to the normal color if it is not. Do this on every change to the user input, addition or deletion, and your indicators will always be correct.
Note: You did not edit your question to include minimal code fragments, posting a link to a file is no substitute for this. You need to isolate the problem, which is what you should be doing anyway in trying to solve it, show the code for that issue in the question.
In this case you maybe could have include the code for a particular test - uppercase, digit, etc. - and explain what it was doing right and what didn't work. Maybe here because I don't know my answer is correct, it is a guess - to be sure I'd have to scroll through in detail 5 pages of code on a tablet I'm currently typing this on, essentially debug your code and that is not what Stack Overflow is here for.
You have help people help you, and show you've put effort in, or people just won't be willing to put in effort to help you.
That said, I hope the guess helps, and stick with SO asking and answering questions!

Related

How to create "menu grid" in kotlin

I have searched google/stackoverflow etc. for answer to my question, but I didn't quite manage to find the right one. I believe I just don't know, how to set the question properly, and thus I cannot find solution.
Is there any way, how to create grid like I drawed in following image (with red colour):
I need to add this red grid to several images, which look very simmilar. The grid field (the one selected) have rolling menu, prescribed position, and a field for additional text. Black lines in background are image in background, and the red supposed to be grid above the image. I thought of creating a lot of buttons alined to each other, but i think that is very bad way to do so.
I would like a pop-up menu from selected field, but opening new activity with same fields is usable aswell. Is there any "simple" solution for creating such grid/menu ?
Btw, I am not programmer with many experience with coding, let's say, I know basics only.
Thanks in advance.

How to use a button to change style of a TextInput

Need to make a button change the color of the font from a TextInput textbox to atleast 4 different colors.
so, i'm quite new in react-native and im having a problem to solve one of my assignments, my teacher asked us to create a button that changes the color of the font inside a Text Input text box to one of 4 different colors presets onPress , couldn't figure it out on my own and cant seem to find any tutorial with this kinda of examples, just found some tutorials that only explain how to change the color from the buttons onPress.
Since you mentioned this is your assignment from your teacher, I would not provide any code, but just a general guideline on how to create the code yourself so that you could try and make it yourself.
What you need to do are :
Create the 4 styles for the text color as const that you can refer to later.
You would also want to have a state to indicate which color you want to show and change it according to the button pressed.
And you would need to pick the correct style from the const made from step 1 above based on the state like shown on this link.
Hope you good luck ini finishing your assignment.

iOS 12 OTP keyboard suggestion

I'm trying to implement the transfer of a one-time code from SMS to the field above the keyboard, as in the image.
But for some reason the field above the keyboard is not displayed.
Code:self.valueTextField.textContentType = UITextContentTypeOneTimeCode;
UI hierarchy:
+UIView
CustomContentView
UIImageView
UITextField - valueTextField
UITextFieldContentView
I have read these materials:soQuestion and apple docs , and I saw a warning:
If you use a custom input view for a security code input text field, iOS cannot display the necessary AutoFill UI.
... but I do not understand what is meant by custom input view.
Also I have category for UITextField. Can it affect the work?
I will be glad to any ideas, thanks!
Okay. This is what I could find out. Regarding the code, it is enough that I described above. Additional settings on the client is not required. But you need to pay attention to the text of the SMS message. As an example, I attached two messages.
In the first message, our code is defined by the system as a phone number. We can even call it if we click on it. But why do we need to call a one-time code? :)
In the second image, the code is defined as one-time, just what we need. If we click on it, the system will offer to copy it to the clipboard.
What is the difference? Unfortunately, it is not completely clear by what rule the text is parsed in SMS. But we can check your text in the following way:
If you set a property textContentType to your text field and nothing works for you, the first thing you need to check is whether the operating system determines the code correctly. To do this, simply go to the message application and check the code:
blue font color with underscore - the system did not recognize
one-time code.
black font color (as default) with a gray underscore - it's okay!
At the end, in the first case, you should check the text of the message for the contents of incorrect characters.
PS Just a couple of examples of correct and incorrect SMS:
SMS-code: 12345 £ correct
SMS-code: 12345 $ correct
SMS-code: 12345 № correct
SMS-code №1: 12345 incorrect
I got caught out by the fact "Autofill PAsswords" was turned off on the phone.
It seems that it needs to be on for this functionaility to work.

Read only textbox with different text colors?

I've been wondering this question for a while and my friend recommended me this website, so yeah, I'm new here.
I'm trying to learn VB.net but I've found nothing about this. Can anyone help me?
I have a textbox which is read only. Inside the textbox, I have text that says "Checking" (in blue letters)
This waits about 20 seconds usually, and then below it it says either "Completed" (green text) or "Failed" (red text) while the checking still remains blue.
Is there a way to do this? Sorry that I'm not explaining stuff the best but I just need help.
Thank you!
it will be awesome if you tell us what you actually want to accomplish, since it is not very specific but what I understood you want to wait for 20 seconds for something to be accomplished, so I will recommend System.Threading.Thread.Sleep and there should be a method that allows you to know your process is ready to go. to change the color lblGrade.ForeColor = Color.Orange should do the trick.

wacom and myscript set handwritng recognition function

im not sure if its the right place to put my question, but i think maybe get an answer here.
the last few days thinking about a way to make μυ work easier.
What I want is to write by hand and convert into text on the computer.
namely when I am on a page with multiple text forms like this im writing now,
when i choose a text form with a pen (like wacom graphic tablet) write on a surface and the automaticaly when i stop or pressing a button the text turn into text in the form.
my title say about wacom because i found bamboo scribe.. if someone uses this please explain me whats can do and if can work for me.
i test myscript. with fullscreen tool wich you can write everywhere on the screen is easiest but when you finish you have to press a button on the program to insert the text in the selected area.
so my question is there any way to press that button with the button placed on stylus pen?
i saw that you can set functions when a button clicked on the wacom tablet or on pen.
i have not bought yet anything because im searching if is out there anything could do what i want better. something made for that particular job
Thanks and sorry for my bad english..