About Search Archive
Matt Gallagher: Cocoa with Love Matt Gallagher: Cocoa with Love
← Newer 6 7 8 9 10 11 12 13 14 Older →
  • Designing a view with Bindings (UITableView on the Mac)

    Mar 10, 2010 (an Objective-C era article)

    Bindings are one of the best ways of connecting your view and model on the Mac but due to the layers of abstraction involved — and the fact that they don't exist on other platforms — bindings can seem foreign and confusing. In this post, I'll show a complex view that is traditionally implemented without bindings (the iPhone's UITableView) and show how it might be redesigned for the Mac with bindings.
    Read more...
  • Load from NIB or construct views in code: which is faster?

    Mar 1, 2010 (an Objective-C era article)

    You don't have to look far to find people suggesting that constructing views in code will increase the speed of your program. Since interface performance is a serious concern in iPhone development, I thought I'd look at the performance speed in creating complex iPhone UITableViewCells in code versus loading them from a NIB file.
    Read more...
  • StreamToMe 2.0 is out (and Cocoa With Love is 2 years old).

    Feb 26, 2010 (an Objective-C era article)

    Two different things turning two different kinds of "2". Snap.
    Read more...
  • Resolving a path containing a mixture of aliases and symlinks

    Feb 21, 2010 (an Objective-C era article)

    Resolving symlinks in a path is very easy in Cocoa (it can be done in a single statement) but aliases require more work. Additionally the commands for resolving symlinks and aliases are incompatible with each other — meaning that you can resolve a path containing symlinks or aliases but not a mixture of the two. In this post, I present a category on NSString that will allow you to resolve a path containing any combination of symlinks or aliases as simply as resolving symlinks alone.
    Read more...
  • The differences between Core Data and a Database

    Feb 16, 2010 (an Objective-C era article)

    The Core Data Programming Guide clearly states that Core Data is not a database but since both Core Data and a database are ways of providing searchable, persistent storage, exactly how and why they are different may not be clear. In this post, I'll look at the way Core Data works and the reasons why its features and capabilities are different to those of common SQL databases — even though an SQL database may be used as the backing store.
    Read more...
  • Custom build rules, generated tables and faster floating point

    Feb 8, 2010 (an Objective-C era article)

    As fast as computers are, heavy use of floating point functions can still slow them down. One way around this, is to use a lookup table instead of calculating floating point values at runtime. But keeping a generated table up-to-date is annoying work. In this post, I'll show you how to create a lookup table automatically using a custom build rule, making an OpenGL animation 5 times faster in the process.
    Read more...
  • Finding the cause of performance issues in your programs

    Feb 1, 2010 (an Objective-C era article)

    This post is a response to reader questions asking how, in my previous post on Replacing Core Data Key Paths, I knew that the biggest performance problem in my initial approach was the incremental reallocation of NSMutableSet. In this post, I'll look at basic time and memory profiling on the Mac and talk about the most common types of scenario to look for when you're trying to solve performance problems.
    Read more...
  • 5 key-value coding approaches in Cocoa

    Jan 25, 2010 (an Objective-C era article)

    Key-value coding (KVC) is a way of decoupling a generic action from the specific properties it may need to act upon. It is most commonly associated with the NSKeyValueCoding protocol but there are a number of other ways to achieve the same effect. In this post, I look at why key-value coding is important and show you 5 different ways — each with their own particular advantages — to implement this pattern.
    Read more...
  • What is a meta-class in Objective-C?

    Jan 17, 2010 (an Objective-C era article)

    In this post, I look at one of the stranger concepts in Objective-C — the meta-class. Every class in Objective-C has its own associated meta-class but since you rarely ever use a meta-class directly, they can remain enigmatic. I'll start by looking at how to create a class at runtime. By examining the "class pair" that this creates, I'll explain what the meta-class is and also cover the more general topic of what it means for data to be an object or a class in Objective-C.
    Read more...
  • Getting the subclasses of an Objective-C class

    Jan 11, 2010 (an Objective-C era article)

    Getting the full list of subclasses for a class is a fairly simple task but it requires some uncommon runtime functions which can make the process more difficult. In this post, I look at how a Class is defined in Objective-C and two completely different ways of working out the subclasses.
    Read more...
← Newer 6 7 8 9 10 11 12 13 14 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: info@cocoawithlove.com