About Search Archive
Matt Gallagher: Cocoa with Love Matt Gallagher: Cocoa with Love
← Newer 8 9 10 11 12 13 14 15 16 Older →
  • Creating iPhone and Mac icons using Inkscape (Part 1 of 2)

    Nov 3, 2009 (an Objective-C era article)

    In this two part series, I'll give a beginner's guide to creating iPhone and Mac application icons using Inkscape — a free, vector illustration program. In this first part, I'll talk about the common styles and traits of icons on the Mac and iPhone and give a step-by-step guide to creating the first iPhone icon in Inkscape.
    Read more...
  • Memory and thread-safe custom property methods

    Oct 25, 2009 (an Objective-C era article)

    Objective-2.0 property methods are a nice convenience but if you need to override a property implementation — particularly an atomic, retained or copied object setter property — there are some potential bugs you can create if you don't follow the rules carefully. I'll show you the pitfalls and the correct way to implement a property accessor. I'll also show a way to directly invoke hidden runtime functions to let Objective-C perform atomic getting and setting safely for you.
    Read more...
  • How blocks are implemented (and the consequences)

    Oct 18, 2009 (an Objective-C era article)

    This post is a look at how clang implements blocks and how this implementation leads to a number of strange behaviors including local variables that end up global, Objective-C objects allocated on the stack instead of the heap, C variables that behave like C++ references, Objective-C objects in non-Objective-C languages, copy methods that don't copy and retain methods that don't retain.
    Read more...
  • Objective-C's niche: why it survives in a world of alternatives

    Oct 12, 2009 (an Objective-C era article)

    Objective-C remains an impediment for many programmers coming to the Mac or iPhone platforms — few programmers have ever experienced it before learning Cocoa, forcing two learning curves at once for new Cocoa developers. How did Apple end up with such a weird language? And for a company known to replace CPU architectures and their entire operating system, why does Apple persist with Objective-C? The answer lies in the methods.
    Read more...
  • The ugly side of blocks: explicit declarations and casting.

    Oct 5, 2009 (an Objective-C era article)

    Blocks are a welcome addition to C/Objective-C/C++/Objective-C++ with Snow Leopard but they carry with them the worst aspect of Standard C: function pointer declaration and casting syntax. In this post, I'll show you how to understand declarations and casting syntax for blocks and function pointers, even in the worst of scenarios.
    Read more...
  • Optimizing the loading of a very large table on the iPhone

    Sep 28, 2009 (an Objective-C era article)

    In this post, I look at a UITableView on the iPhone which loads its data from a server and look at how its performance scales from single rows to tens of thousands of rows. I'll examine which aspects of the iPhone scale well and which become a burden as a displayed dataset moves from trivially sized to large sizes.
    Read more...
  • StreamToMe Version 1.1 available

    Sep 22, 2009 (an Objective-C era article)

    The latest version of StreamToMe — for streaming audio and video from your Mac to your iPhone/iPod Touch — is now available on the App Store. It has only been one month since I released version 1.0 but I have lots of new changes to share.
    Read more...
  • WhereIsMyMac, a Snow Leopard CoreLocation project

    Sep 21, 2009 (an Objective-C era article)

    In Snow Leopard, you can ask for the computer's location. Without a GPS, how accurate could that be? The answer in my case is: very accurate. In this post, I'll show you how to write a CoreLocation app for the Mac that shows the current location in Google Maps, so you can see exactly where your computer thinks it is.
    Read more...
  • Building for earlier OS versions from Snow Leopard

    Sep 16, 2009 (an Objective-C era article)

    It is very easy, when developing on a new operating system, to create projects that won't run on any previous OS version. To ensure backwards compatibility, there are Xcode and gcc options that allow you to build while maintaining support for earlier OS versions. In this post, I'll look at the ways in which this compatibility is controlled and some of the new ways it can go wrong on Snow Leopard.
    Read more...
  • Creating alpha masks from text on the iPhone and Mac

    Sep 9, 2009 (an Objective-C era article)

    Alpha masks are a powerful way to create graphical effects in your program. In this post, I'll show you how to create an alpha mask from a text string and use that mask to create text-based effects with an image. I'll also show you how to do this on the iPhone and the Mac, so you can see the differences between these platforms in this area.
    Read more...
← Newer 8 9 10 11 12 13 14 15 16 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: