top
about archive search zqueue.com
Matt Gallagher: Cocoa with Love Matt Gallagher: Cocoa with Love
← Newer 11 12 13 14 15 16 17 18 19 Older →
  • Using NSKeyedArchiver to archive a C linked-list

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

    NSKeyedArchiver provides some support for archiving C primitive types but provides no support for pointers to C structs. I'll show you how you can archive a linked list of C structs, despite the lack of support in NSKeyedArchiver.
    Read more...
  • Recreating UITableViewController to increase code reuse

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

    UITableViewController and UIViewController are the two most commonly implemented controllers on the iPhone. It may not always be clear what UITableViewController adds to its superclass. I'll show you what UITableViewController does by recreating its functionality on top of UIViewController and show you why doing this can provide a richer base controller class that you can use throughout your iPhone application.
    Read more...
  • Scripted window management in Xcode

    Mar 13, 2009 (an Objective-C era article)

    Xcode's placement of windows and views has never entirely satisfied me. In this post, I'll show you a series of Applescripts that I use to create my own arrangement of Xcode windows so that I can choose where different kinds of documents are placed and reorganize the layout of windows with basic key commands.
    Read more...
  • An Asteroids-style game in CoreAnimation, Part Four.

    Mar 8, 2009 (an Objective-C era article)

    Over the last three weeks, I presented a simple 2D game using CoreAnimation. For the final post in this series, I'll look at CATransactions and why I didn't use them in the game to handle animations and I'll look at the performance of CoreAnimation as numbers of CALayers and sizes of CALayers change.
    Read more...
  • An Asteroids-style game in CoreAnimation, Part Three.

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

    How would you write an arcade-style 2D game in CoreAnimation? I'll show you how to write a resolution independent, high-speed, model-view-controller designed, Asteroids-style arcade game using CoreAnimation as the screen renderer. In this third of four parts, I add the logic for the game and game objects and present the finished code for the project.
    Read more...
  • An Asteroids-style game in CoreAnimation, Part Two.

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

    How would you write an arcade-style 2D game in CoreAnimation? I'll show you how to write a resolution independent, high-speed, model-view-controller designed, Asteroids-style arcade game using CoreAnimation as the screen renderer. In this second of four parts, I'll create basic objects in the game and their corresponding CoreAnimation Layers on screen.
    Read more...
  • An Asteroids-style game in CoreAnimation, Part One.

    Feb 17, 2009 (an Objective-C era article)

    How would you write an arcade-style 2D game in CoreAnimation? Over the next few weeks, I'll show you how to write a resolution independent, high-speed, model-view-controller designed, Asteroids-style arcade game using CoreAnimation as the screen renderer. In this first of four parts, I'll detail the concept for the overall application and show you how to create a resolution independent window for the game.
    Read more...
  • Breadth-first traversal of a graph of Objective-C objects

    Feb 7, 2009 (an Objective-C era article)

    If you have a collection of interconnected objects in Objective-C, what is the best way to traverse them all in order from nearest to furthest? Are the NSMutableSet methods good for tracking already-visited nodes? How much overhead does an NSMutableArray FIFO queue impose relative to a depth-first search (which doesn't require a FIFO queue)? Does NSMutableArray perform better if objects are pushed onto the front, or the back? In this post, I present answers to these questions and more.
    Read more...
  • Interprocess communication: snooping, intercepting and subverting

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

    When Xcode is running, Interface Builder seems to magically know which classes, methods and variables are available. Where does Interface Builder get this information? How can you recreate this effect when editing source files in an external editor without Xcode running? This is the story of how I investigated the communication between Xcode and Interface Builder, so that I could recreate it for myself.
    Read more...
  • Multiple virtual pages in a UIScrollView with just 2 child views

    Jan 23, 2009 (an Objective-C era article)

    The UIScrollView and UIPageControl in Cocoa Touch allow for user interfaces with multiple panning pages. The sample project that Apple provides (PageControl) keeps all child views for every page in a lazily loaded array. I'll show you how you can implement this using just two child views, no matter how many virtual pages you wish to represent.
    Read more...
← Newer 11 12 13 14 15 16 17 18 19 Older →
  • Subscribe: RSS or JSON
  • Twitter: @cocoawithlove
  • Github: mattgallagher

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