Domanda

I want to create custom reminder without using alarm, because I have requirement like when a uitextfield 's value increases than previous value the reminder need to be called.

So Is there any way for doing that ???

Thanks in advance

È stato utile?

Soluzione

If you want to show an alert if the text entered in the textfield is greater than 1000 in length, then use
1. UITextField delegate methods. There are methods that get called at every time you enter any character in the textfield. Read more here. You will find a method of your needs.

2.In that method use an if-else condition to check the length of the enteterd text.
Find a property in this link which helps you getting to the length of the text entetered so far in textfield.

3.Use UIAlertView to show alert. Here is the link.

PS: I could have given you the code, but I think it would be more beneficial for you to read these docs and try to implement. In case you stuck somewhere, ask specific questions and we will help you.

Altri suggerimenti

I think you have to be more specific, but as far as I get what you need is, if the value increase then previous values. For this you need to store last entered text onto string and if user type new text then compare it and if it is increase then set or show alert view. Add your logic into this delegate.

    - (BOOL)textFieldShouldBeginEditing:(UITextField *)textField

Thanks. Hope it'll help.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top