top
about archive search zqueue.com
Matt Gallagher: Cocoa with Love Matt Gallagher: Cocoa with Love
← Newer 3 4 5 6 7 8 9 10 11 Older →
  • A Cocoa application for running scripts

    Nov 12, 2010 (an Objective-C era article)

    Last week, I showed a bash script that you can use to build, tag and package a Mac application. As I'll show you this time though, I prefer to use a compiled Mac application to do the same thing. The important code here is a set of classes that support script-like invocations of other programs and support for a structured build-log based on the results of each step.
    Read more...
  • A deployment script for a generic Cocoa Mac application

    Nov 5, 2010 (an Objective-C era article)

    Deployment for a Cocoa Mac application normally involves a few common steps: committing code into a repository, updating version numbers and packaging the application as a DMG disk image. In this post, I'll show you a combination bash/perl/Applescript to handle all these tasks in a single script.
    Read more...
  • An iOS tone generator (an introduction to AudioUnits)

    Oct 20, 2010 (an Objective-C era article)

    In this post, I present a tiny iOS app that generates a continuous tone at a frequency determined by a slider. It's a small sample app intended to show the simplest way to send audio data you generate to the speaker.
    Read more...
  • Testing if an arbitrary pointer is a valid object pointer

    Oct 6, 2010 (an Objective-C era article)

    In this post, I look at an approach for testing if an arbitrary pointer is a pointer to a valid Objective-C object. The result from the test is not absolutely accurate and can interfere with gdb debugging if the pointer isn't a valid memory location, so this is not something you'd want to do often (and certainly not in production code). But it can be a handy debugging tool for when you're staring blindly at memory you didn't allocate.
    Read more...
  • A ZoomingViewController to animate a UIView to fullscreen

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

    ZoomingViewController is a class you can attach to any existing view that will let you zoom the view to fullscreen with a single tap, rotate the view while in fullscreen by rotating the device and tap to return to the original inline state.
    Read more...
  • Minimalist Cocoa programming

    Sep 20, 2010 (an Objective-C era article)

    In this post, I build and run a Cocoa Mac application on the command-line. This might not sound like a very difficult goal but I'll attempt to follow an additional constraint: use as few tools, components, classes and even lines of code as possible; truly minimalist Cocoa programming. The goal is to create an application that qualifies as a proper Mac application (including a menubar and a window) but without using Xcode, without an Info.plist file, without NIB files, without Interface Builder and without even using a text editor other than the Terminal itself.
    Read more...
  • The overhead of spawning threads (a performance experiment)

    Sep 14, 2010 (an Objective-C era article)

    In this post, I take a casual look at the relative performance overheads handling tasks in different ways: performing all tasks in the main thread, sending tasks to a single worker thread, spawning new threads for every task, and using Grand Central Dispatch (GCD). This won't be a particularly advanced investigation, simply a quick overview of simplicity versus performance in job management.
    Read more...
  • Substituting local data for remote UIWebView requests

    Sep 6, 2010 (an Objective-C era article)

    In this post, I'll show you how you can load a webpage in a UIWebView in iOS while using a modified NSURLCache to substitute local copies of resources within the webpage for the remote copies referred to by the actual page.
    Read more...
  • Alternative Objective-C object allocation for large arrays

    Aug 30, 2010 (an Objective-C era article)

    In this post, I'll show you how you can create objects without using the standard instance allocation process (either +[NSObject alloc] or class_createInstance()). I'll also explain why you might do this — the benefits and drawbacks to a custom object creation process.
    Read more...
  • Is a virtual machine for Cocoa programming inevitable?

    Jul 15, 2010 (an Objective-C era article)

    Recent articles by Jesper have re-ignited some discussion about whether Apple might be working on another programming language to replace Objective-C. Neither of these articles closely examined a related but possibly more important question: is Apple planning to move application development to a virtual machine? In this article, I'll look at why I think moving to a virtual machine might happen along with a possible language transition.
    Read more...
← Newer 3 4 5 6 7 8 9 10 11 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: