About Search Archive
Matt Gallagher: Cocoa with Love Matt Gallagher: Cocoa with Love
← Newer 11 12 13 14 15 16 17 18 19 Older →
  • What does it mean when you assign [super init] to self?

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

    One of the strangest pieces of common syntax in Objective-C is the line self = [super init];. Without any explanation, this arrangement raises a few questions. Does this line set the self value for the instance? Is self just a variable like any other? If so, why have it at all? I'll address each of these questions and show how the compiler converts uses of self and method invocations.
    Read more...
  • Showing a "Loading..." message over the iPhone keyboard

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

    The "Text" (SMS) application on the iPhone uses a custom, semi-transparent view to show its "Sending..." message over the keyboard. I'll show you a simple class that can display semi-transparent loading messages and how you can display messages over the keyboard.
    Read more...
  • 8 Confusing Objective-C Warnings and Errors

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

    Objective-C's unique syntax results in unique ways of making mistakes. In this post, I look at the compiler warnings and errors GCC outputs when you make mistakes or potential mistakes in your Objective-C syntax and show you how to fix them.
    Read more...
  • 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...
← Newer 11 12 13 14 15 16 17 18 19 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: