Posts

Custom UISwitch to show YES / NO

Image
You can see this in action in my free water tracking application " Hydrate Yourself ". If this helped you please consider downloading it and leaving a review. One of the great things about iPhone development are that there are lots of user interface pieces that are easy to put together and customize. Unfortunately there are also a lot of pieces which don't have all the basic customizations that may people want. The UISwitch is one of those. Here is the standard UISwitch: Its size, colors, and ON / OFF text are not changeable. Fortunately there are several great re-implementations (and a few hacks that use restricted API calls) to modify all this. One that I am using is the RCSwitch class available here . I made two small changes to this code, first I renamed his RCSwitchOnOff class to RCSwitchYesNo and changed the labels to YES / NO. Second I added an init method to the RCSwitch.m base class which called the usual init function but provided the default frame size....

UITableView which is its own Delegate and DataSource

I spent some time tonight working out a simple class which extends UITableView and conforms to its own protocols. If you are just learning about UITableViews they can seem a little daunting, but like so many other pieces in the iPhone toolbox they are very easy to use once you get the hang of it. If you add a UITableView to your root view it will be a box with some lines across it and you can make them move by touching and dragging in vertical gestures. In order to respond to the touch selections you must set a delegate to the class, just like any other object (Like UIButton or UISwitch). There is a second delegate called "dataSource" which is used to populate the table "cells". The delegate class must conform to UITableViewDelegate and UITableViewDataSource.

Taking Stuff Apart: Coffee Machines

Image
These are some broken coffee machines I've had hanging around for a while. The cheapest Mr. Coffee that Walmart sells and some fancy Morphy Richards coffee/espresso machine. The fancy one was from my first and only Woot Bag of Crap - they sent me a broken coffee machine. Rather than throw them in the dumpster I decided to take them apart then throw them in the dumpster. Here they are:

This Way Up: First App Submitted

Image
Free Version and Ad Free Version I've submitted my first app to the app store. The process was fairly easy. Hopefully a couple people will find it and be amused. At 99c this app which uses the magical iphone accelerometer is certainly a bargain. Here is a video:

Make a TAP with a MAC in Garage Band

Image
I'm not a very fun person, so using a fun computer like a MAC is hard for me. Using fun software like Garage Band is even harder. I needed a TAP sound for a project I'm working on and this MAC is the only device I have with a microphone, and Garage Band the only program I knew of for doing audio stuff. This is the guide I wish I had earlier today. 1. Create a new Voice project:

iPhone App: This Way Up

I started working on a new project the other night.  It took most of the night but the proof of concept looks promising.  Take a look at the video below, follow the link to flickr to see it in HD.

Taking Stuff Apart: Sony TC-800B Portable Reel-to-Reel Recorder

Image
Today we have a Sony TC-800B to take apart. This is a portable Reel-to-Reel recorder is from the late 60's or very early 70's and is the same device that was used to record the watergate tapes . Unlike the TEAC 360S I took apart last week, this machine was very easy to take apart. The one I came across even had a carrying case, you might notice that the handle is crooked. This thing was somewhat busted up, if you look closely you can see through the window in the case that the plastic covering the reels is cracked too: