RSS

How to Send an Email in Cocoa

Image

There are a few ways to send email from a Cocoa app. A few frameworks let you directly send an email without the user ever having to do anything. In my development, I wanted to open Mail with a pre-constructed message and let the user edit the email in Mail before sending it. I had [...]

Instantaneous Frame of Moving Core Animation Views

Image

For this Cocoa Code Snippet, I’d like to post a little clarification that caused me some grief a day ago. I was working on a Core Animation enabled view (in a Cocoa Touch project but this post applies to normal Cocoa as well). This view was animating after I set its frame using the following [...]

Receiving Enter & Arrow Key Presses From NSSearchField

Image

The philosophy behind my Cocoa Code Snippets has been to post little quick tips on Cocoa routines and methods and such that have caused me to do some thinking/researching/tearing my hair out. This day’s tip came up in my development of the new Todos. With an NSSearchField you might find it difficult to find out [...]

Cocoa Code Snippet: Simple Window Fade In/Out

Image

Continuing the Cocoa Code Snippet series, I want to put up a nice useful method I add to most of my NSWindows. Consider making it a category. This bit of code will allow your windows to fade in and out nicely when they are closed. Before Leopard and Core Animation, you had to write your [...]

Instantiating an Object in Interface Builder on Leopard

Image

If you’re like me, you’ve began the transition to coding on Leopard. After giving XCode and IB a swirl, you’re going to want to get down to coding real stuff. After starting a new project and creating a a few classes in XCode you want to instantiate your controller object. When you open up Interface [...]

CocoaCodeSnippet: Split NSString on Space or Line Break

Image

I’m starting a new section on my blog: CocoaCodeSnippets. Whenever I run into some interesting code or write a little short method that seems useful, I’m going to post a short little explanation and share the code. For my first CocoaCodeSnippet, I wanted to pose a solution to a problem that might have a better [...]

There's plenty more to read.