Tech Thought

Tech tips, hints, and general musings. PHP, Perl, Mysql, Javascript, AJAX, JSON, Linux, Mac OSX

Entries Tagged ‘iPhone Development’

How-To: Show/sync volume control in iPhone SDK

Developing for the iPhone, we wanted to show a volume control that sync’ed with the user’s volume control buttons on the side of the phone.  It turns out, the best way to do this is to show the volume control using the MPVolumeView class (part of the MediaPlayer framework).
Here is some example code from our [...]

Leave a Comment

How-To: Fix ‘Verification Failed’ error (0xe8000001) iPhone Adhoc Distribution

I have had huge problems trying to provide my iPhone Applications to friends using the Adhoc Distribution method.  I thought I was following Apple’s instructions down to the letter:

Obtain an Adhoc Distribution Provisioning Profile
Install provisioning profile in XCode
For my project, create a new build profile called “Adhoc Distribution” copied from the “Release” build setting
Set the code [...]

Leave a Comment

How-To: Convert a string to NSDate

In Objective-C, you commonly nead to convert a string to an NSDate object.  A simple way to do this is using the NSDateFormatter object.  It provides the dateFromString method which converts a string into an NSDate object.  You do, however, need to tell NSDateFormatter the format the date will be in.  See below example:
NSDateFormatter *df [...]

Leave a Comment

UIScrollView not working - scrolling doesn’t work

Okay, so I’ve just spent the last few hours trying to work out why my UIScrollView won’t scroll! The secret, I’ve found, is the following:
- (void)viewDidLoad {
    [super viewDidLoad];

    // Setup scroll view
    [scrollView
setContentSize:CGSizeMake(backgroundImage.frame.size.width,
[...]

Leave a Comment

iPhone Development: How to Stream Audio (mp3)

Okay, so we’ve fully taken the plunge and are now developing for the iPhone platform.  Its got a fantastic SDK, with lots of really nice features and tools to help you with your developing fun.  However some tasks are a little more difficult than you’d image.
For instance, we wanted to stream an MP3 file with [...]

Leave a Comment