Skip to content

{ Category Archives } code

Plug-And-Play OpenAL / AVFoundation Sound Engine For iPhone Apps

I recently found a great sound engine for iPhone applications that is pretty much plug-and-play.
This sound engine was written by Alex Restrepo under a creative commons attribution-share alike licence, so you are free to use it so long as you attribute the code to the author and if you change it and share it you [...]

Xcode Script For Creating Properties From Instance Variables For UIViewController

One of my favourite blogs on the net is Matt Gallagher’s Cocoa with Love. Today I was investigating ways to speed up my workflow in Xcode and I found a great mixed Perl and AppleScript script already written by Matt a couple of years ago.
The script called PropertyFromInstanceVariable had already been added to by a couple [...]

Online JSON Validator

I was creating some JSON data with PHP to pass to an iPhone app today and I found a great online JSON validation tool: JSONLint: The JSON Validator.
Just plunk your JSON string into the window and press the validate button. Voila, not only are you told if your JSON string is valid but it also arranges [...]

When To Use self.myObject Instead Of myObject In iPhone Programming

I have seen a lot of confusion on the topic of when and why to reference an object using self.myObject versus just plain myObject. It took me a while to understand this myself, and please, if I am mistaken in my explanation, set me right, but here it is as I understand it.
If you reference [...]

iPhone Camera Overlay App With Custom Button Example

There seems to be a lot of interest recently in making apps that use a camera view with an overlay for augmented reality or what some might call pseudo-augmented reality applications (because often these apps just layer an image or data on a camera view). I wasn’t satisfied with the few examples I found on [...]

Retrieving JSON Data In iPhone Apps

As described at www.json.org, JSON (JavaScript Object Notation) is a lightweight data-interchange format that is easy for humans to read and write and easy for machines to parse and generate. The JSON format is one of two things; a list of name/value pairs that can be realized as an object, record, struct, dictionary, hash table, keyed [...]

Arduino 0017 Released

The latest version of the Arduino IDE has been released.
From the arduino.cc website:
“The open-source Arduino environment makes it easy to write code and upload it to the i/o board. It runs on Windows, Mac OS X, and Linux. The environment is written in Java and based on Processing, avr-gcc, and other open source software.”
Arduino 0017 Release [...]

How To Test For An Internet Connection On The iPhone

If you write an app that uses the internet then the Apple Human Interface Guidelines require that you check for a WiFi or Wireless Wide Area Network (cellular) connection and let the user know if they are not available.
The best way I have found to test for this is to make use of the code [...]

Software Debouncing Multiple Latching Switches With Arduino

This last week I have been working on making the operation of my MIDI controller prototype more robust. One of my tasks has been to debounce and latch the states of my pushbutton toggle switches. Though you could use hardware for debouncing and latching I chose to do it with software. Doing it this way [...]