I have created one Login Screen where user enter their mail id.
But i want to insert one functionality where it should list the mail id automatically when user type first character of mail id
There is one way. I don't know how much feasible it is. So the Idea is : You can store somewhere all the email id after log in success. For example in sqlite database. Now, Implement Notification center for "UITextFieldTextDidChangeNotification" and search for the character in database when user start typing in TextField and show UITableview underneath UITextField with match results (which start from entered character).
When user tap on any cell of Tablview hide tableview and take that cell label value in UITextField. That's it. Hope this logic work.
You can save the emaid id in UserDefaults & use it whereever you want
Related
Im creating a watch app but i have a problem and that is that i want to set a string depending on which table the person pressed in the watch app.
Can anyone help me?????
If I understand correctly you're trying to perform an action when a user taps on a WKInterfaceTable row?
You can achieve this using table:didSelectRowAtIndex: by identifying the corresponding string based on the index and sending an appropriate message to the string.
See the WKInterfaceTable Class Reference
In my app I have the need to allow the user to assemble a "To list" of emails. The built in mail composer has exactly what I want as far as being able to select contacts. It has a drop list that displays potential matched contacts from what you are typing. However this is not for sending an email, therefor I dont' want the CC, Subject, and Body controls.
Is just the "To" field available in a control somehow? I don't see really how to do this without writing quite a bit of code.
I suppose I could always bring up a mail composer and then another view to cover up the rest of the form, but I'd rather leverage just the To field.
Is this possible?
Maybe this will help someone else. After much searching I didn't see any way to leverage the To: field only. I ended up coding my own set of view controllers to copy the actions and behavior. I made the following classes:
Contact (string properties for first name, last name, and email)
Contacts (class methods to create an NSArray of Contact objects in various formats)
ContactFormViewController (analog to the mail composer's To: field)
ContactTableViewController (displays a list of all contacts with a scrubber)
Inside Contacts class, I used ABAddressBookRequestAccessWithCompletion to create an NSArray of Contact* objects, sorting the array as I construct it.
I then have two view controllers, just like the mail composer.
On the first view controller, there is a UITextField to type an email address or name into, a UITableView to display contacts that match the input string, and a UIScrollView which I add UIButtons to each time a contact is selected in the table. Each editingChanged event on the UITextView creates/updates the datasource to the UITableView. There are also two more UIButtons. One to add a manually typed email address to the list selected contacts (this button is only visible if the text input matches an emiail regex), and the other button is to show the UITableViewController if the user would rather browser to contacts than type them in and pick results.
Good afternoon. I would like to know if there is a method that makes the text-field capable of "remember" what the user wrote the previous times, so when the user writes the first letter a list with the proposed words will appear!! :) Thanks!
It can possible to show the list of values in tableview. you can use autocomplete.
Read this article. and also with source code. This will help you.
Sample image
Not that easy, you will have to do some modifications, for example you will need to store in an NSMutalbeArray all the value inserted, then you will have to present a table when the user starts to edit the UITextField this will change as the user writes
as your app runs, there will be many text that you need to remember/store that it will come to the point that your text that you have to remember will grow to size. you can store your text to a local database (sqlite), then as the user writes on the text field, do a search query and return the data.
unless you dont want to remember the text entered when the user used and exited/quit your app.
I am developing an App with information about a location. This information contains phone number, email address, address etc. A bit like the contact detail information of the iPhone itself.
Now my question. When I select a contact in my phonebook, I can select the phonenumber to call, select an emailaddress to mail and select the location information to view it in the maps of the iPhone. This is what I want to achieve.
I have searched google for this functionallity but I am probably searching for the wrong things.Can someone help me to achieve this functionallity?
Thanks!!!
//// Followup
Now I know that the stuff I want to add is possible, I have a followup question about this subject.
Does anyone know where I can find some examples about the actions for calling, mailing and location information? It would help me a lot...
Thnx!!
With kind regards,
Douwe
Here is the link for accessing address book details.
This example shows to display the first name, last name, instead you display phno.,email, location along with a button near ti it.
Then code in your button action to call, mail, view location respectively.
If you are using a UITableView, then tableView:didSelectRowAtIndexPath: will get sent to you (the table view delegate (usually the table view controller)) each time the user presses a row in your table.
In the Contacts app all phone numbers/emails/addresses for that contact are grouped in their own "section". By reading the section from the indexPath using [indexPath section] you will get the index for the section (a NSInteger).
Using your own app logic you can use that index to determine if the user pressed something in the phone/mail/address section. Now that you know what kind of information the user tapped on you can make the right thing (initiate a phone call/send an email/give directions)
Continuing using the same indexPath you can get the exact table view cell that the user clicked on by using [indexPath row]. Now you can send that information (say a phone number) to you own code to handle that information (initiate a phone call).
(Hope it helped, it was my first answer on StackOverflow)
My problem is twofold: 1) I'm trying to determine an eloquent way to allow the user to type into a UITextView and store the time each word was typed into an array. The time will be a float which starts at 0 when the user begins to type. 2) Conversely, I'd like the user to be able to tap on a word in the UITextView and display the time that word was typed (displaying in an NSLog() is fine). Considerations that may throw a wrench into a possible approach -- what if the user goes back to the top of the text and starts typing or to the middle of the text?
Even a suggested approach without code would be appreciated, because right now I'm drawing a blank.
I think you will need to have a delegate for UITextView which implements textView:shouldChangeTextInRange:replacementText:. In there you get every character that the user types. You can get the time/date (using NSDate) and save it when the user starts a word.