About Search Archive
Matt Gallagher: Cocoa with Love Matt Gallagher: Cocoa with Love
← Newer 13 14 15 16 17 18 19 20 21 Older →
  • CoreGraphics curves and lines: a sample app

    Jul 12, 2008 (an Objective-C era article)

    This is a small application which shows the basic CoreGraphics line drawing primitives. Includes mouse editable control points to manipulate the primitives graphically.
    Read more...
  • NSMapTable: more than an NSDictionary for weak pointers

    Jul 6, 2008 (an Objective-C era article)

    NSMapTable is collection class that was introduced in Mac OS X 10.5 (Leopard). At first glance, it would appear to be most useful as an NSDictionary replacement that can choose between "strong" and "weak" pointers. In this post, I'll show you why it is also useful outside garbage collection and how it can do things that NSDictionary can't (or shouldn't) do.
    Read more...
  • Hidden Xcode build, debug and template settings

    Jun 28, 2008 (an Objective-C era article)

    This is a collection of the most useful hidden and hard-to-find settings in Xcode related to building, debugging and file templates.
    Read more...
  • Doing things in Cocoa with "nil"

    Jun 21, 2008 (an Objective-C era article)

    "nil" is a pointer to nothing. Here are some useful things that you can do with that pointer to nothing in Objective-C and Cocoa.
    Read more...
  • Speed test: NSManagedObject ObjC-2.0 accessors

    Jun 13, 2008 (an Objective-C era article)

    A quick, relative-performance test of the 3 ways of accessing NSManagedObject properties in Leopard.
    Read more...
  • Five approaches to listening, observing and notifying in Cocoa.

    Jun 7, 2008 (an Objective-C era article)

    Here are five different ways to implement the Observer design pattern (sometimes called Broadcaster/Listener, Publish/Subscribe or Notifications) in Objective-C and some reasons why each approach can be valuable.
    Read more...
  • Adapter interfaces in Objective-C, using categories.

    May 24, 2008 (an Objective-C era article)

    The Categories feature of Objective-C lets the programmer add extra sets of methods after compilation, something impossible in most compiled languages. Using this feature, here is an Objective-C variant of the classic "Adapter" design pattern that allows two classes to work closely together, without two-way coupling dependency problems.
    Read more...
  • Implementing countByEnumeratingWithState:objects:count:

    May 19, 2008 (an Objective-C era article)

    If you want to use fast enumeration on your own classes, you must implement
    Read more...
  • Objective-C 2.0: Fast enumeration clarifications

    May 15, 2008 (an Objective-C era article)

    Fast enumeration in Objective-C 2.0 is a doubly useful addition: it results in code that looks better and runs faster. Its documentation though, still contains a few points which are ambiguous or misleading. Here are some clarifications that I've uncovered.
    Read more...
  • Square Root: Numerical fun with NSDecimalNumber

    May 9, 2008 (an Objective-C era article)

    NSDecimalNumber is a powerful Foundation class that holds high precision base 10 numbers. The default class only provides basic arithmetic operators, leaving you to write any advanced operations that you need. This is an example that implements a square root using NSDecimalNumber.
    Read more...
← Newer 13 14 15 16 17 18 19 20 21 Older →
  • Subscribe: RSS or JSON
  • Mastodon: @cocoawithlove
  • Bluesky: @cocoawithlove
  • Github: mattgallagher

© 2008-2024 Matt Gallagher. All rights reserved.
Code may be used in accordance with license on About page.
If you need to contact me: