Category Archives: Code Snippets

Snippet: Sending Mail for Your App Using MFMailComposeViewController

This code snippet is a bit longer than usual but it is really useful. It can be added to a view controller to allow sending of mail to a fixed address (although the user can edit it). It could be … Continue reading

Posted in Code Snippets | Leave a comment

Snippet: Handling Key Clicks in a Custom Keyboard

In a custom keyboard or input accessory you may want to support audio feedback or, as they say on the street, key clicks. The code snippet below summarizes how to do this:

Reference Text, Web and Editing Programming Guide … Continue reading

Posted in Code Snippets | Tagged , , | Leave a comment

Snippet: Playing a System Sound

If you are using ARC see: “Playing a System Sound (ARC Version)”. Today I needed to add a simple beep sound to an app. The code snippet below shows all the relevant calls.

If I had found a page … Continue reading

Posted in Code Snippets | Tagged , , , | 3 Comments