How to create a To field like the one in Mail or Facebook app? - iphone

Does anyone know how to create a 'To field' like the one in Mail or Facebook app?
When an address is added from the A-Z list, a blue component that represents the address will be added to the text field. Is there a class provided for this functionality, or do we have to implement by ourselves?

There's no built-in framework. You'll either need to implement it yourself or use one of the open source components, such as Three20 (which includes the one used in the Facebook app).

In Three20's author's blog I found these few lines:
Message composer
TTMessageController emulates the
message composer in Apple's Mail app.
You can customize it to send any kind
of message you want. Include your own
set of message fields, or use the
standard "To:" and "Subject:".
Recipient names can be autocompleted
from a data source that you provide.
Maybe you should take a look at its source code at github.

Related

Add telephone number to ical

Is it possible to add a telephone number to an ical file? I currently have this set as the "ORGANIZER":
ORGANIZER;CN="{ORGANIZER_NAME}":mailto:{ORGANIZER_EMAIL}
I would like to add a phone number to be able to call the ORGANIZER from e.g. Apple calendar.
According to the RFC5545 specification, the organizer is of value type CAL-ADDRESS.
https://www.rfc-editor.org/rfc/rfc5545#section-3.8.4.3
If one follows through on CAL-ADDRESS https://www.rfc-editor.org/rfc/rfc5545#section-3.3.3, it is defined as
The value is a URI as defined by [RFC3986] or any other IANA-registered form for a URI.
If one then clicks through on the RFC3986 specification link, to https://www.rfc-editor.org/rfc/rfc3986#section-1.1.2 and in particular the examples being easier to understand, one sees a tel example
tel:+1-816-555-1212
so just like the mail-to, one should be able to use .
Of course one has to check whether the receiving applications will cope with it. They don't support the specs 100%.

Name input like SMS or Facebook app

I'm trying to find a library that can handle autocompletion with tokened (grouped) texts.
There are some very nice libraries out there for autocompletion such as:
https://github.com/EddyBorja/MLPAutoCompleteTextField
https://github.com/hoteltonight/HTAutocompleteTextField
https://github.com/TarasRoshko/TRAutocompleteView
The problem here is, I want to make the selection look like names tagging at SMS or Facebook app. So when the user tries to delete, he should delete all the text.
There are good jQuery implementations, one of them is this:
http://loopj.com/jquery-tokeninput/
I couldn't find any for iOS, perhaps the keywords are very generic, thus Google does not show any related results. Is there any library for this or can you provide any code examples?
What you're trying to achieve can't be done using the public SDK.
However, there exist some nice third party solutions.
I found this question, Is there an iPhone equivalent to the NSTokenField control?, which includes links to controls you could use.

Implementing a To-field as in mail.app

Is there a way to get the To-field, as it is implemented in mail.app, into my app easily? If not, how would you go about creating such an advanced component that has manual text entry, "packaging" of entered addresses in "blue boxes", line wrapping and a '+' button to access the address book?
(I already have the code necessary to pick out contacts/e-mail addresses, I'm only asking about the To-field.)
Apparently the TTMessageController in Three20 is what you're looking for, according to this question: How to create a To field like the one in Mail or Facebook app?

iPhone Address Book Search

I want to create an inline address book search on my application. Basically I have a UITextField and I want it so that when you start typing text in, it will bring up search results from your Address Book, and can auto-complete what you're typing when you click it. If you look in the SMS or Mail application, typing in the "To" field when sending a message is exactly what I want.
I've looked through Apple's Address Book Programming Guide and the closest thing it has is ABPeoplePickerNavigationController. But this brings up a new view controller, which is not what I want. So my question is, is there an iOS API that allows me to use this search functionality? Or do I have to write my own?
tl;dr How do I mimic Apple's Address Book search function directly in a text field?
This demo project includes source code to perform an inline address book search from a UISearchBar.
You'll need to use the ABAddressBookCopyPeopleWithName API.

create own plugin for Thunderbird or Zarafa?

I want to enhance my thunderbird (or zarafa), so that i can rightclick on a mail, and get a dialog, where i can fill in some information (like an article reference, an issue number or an invoice) and press "send", and this information alongside with the email and (logged-in) user-information will be sent to another webservice (i.e. a XML-RPC-call, but anything else will also do) which then handles the e-mail (for example attaching the content to the invoice, to the issue resp. the article)? [i need the thunderbird/zarafa part]
thanks for any help (even if it is an answer like "not possible")
This should be quite possible using an extension. First of all you should look into the basics of creating a Thunderbird extension or creating a Mozilla extension in general.
What you then want to do is create an overlay for the context menu, which adds a menuitem that opens your custom dialog. If you use the openDialog method you can pass additional arguments to the dialog, like the currently selected message header (gFolderDisplay.selectedMessage).
From there you can get mail headers, selectedMessage is of the type nsIMsgHdr. Getting the body of the message is a bit more complicated because you have to stream the body and then parse the mime body, but its still possible using the js mime emitter. There are some changes underway that might make this easier in the future, so please double check if there is not an easier way to stream the body.
With that information, you can easily use standard methods (i.e XMLHttpRequest) to send your data to a web service.