I had to build a custom segment control for my current project (http://www.spartanapp.com) and made a backup for it on GitHub.
The segment control is derived from UIControl and I use background images for the customization. You can set the background images with the following method:
- (void)setImage:(UIImage *)image forState:(UIControlState)state controlSegment:(ControlSegment)segment;
Maybe one of you needs the same piece of code. Have fun and follow twitter.com/gekitz for further updates.