Tech Thought

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

Entries Tagged ‘iPhone Development’

What does iPhone OS 3.0 Mean for your Apps?

Recently I was involved in a podcast regarding the iPhone OS 3.0 upgrade. We looked at all the new features (and some upcoming ones in v3.1) and discussed how they relate to new features clients can develop in their apps. You can hear more here: What does iPhone OS 3.0 Mean for Your Apps (WSP [...]

Leave a Comment

How-To: Solve ‘modifying layer that is being finalized’ iPhone SDK

Okay, so I’ve been getting the ‘modifying layer that is being finalized’ error message when i’m trying to release a subview from a superview: [self.popupPreviewView release]; self.popupPreviewView = nil; The best way to solve this (that I’ve found – please post a comment if you can provide a better one) is to remove the view [...]

Comments (2)

iPhone App Icon Doesn’t appear on iPhone, works in Simulator

If your iPhone App icon isn’t appearing on your phone, but works fine on the simulator, it may be a problem with the way you’ve saved your Icon.png file: I had this problem, until I chose to “show” the extension of the Icon.png file when I saved it from within Preview.  Once I’d done this, [...]

Comments (2)

How-To: Make UIWebView transparent

Common problem, need to apply nice HTML formatting for a section of your page, but want the UIWebView not to appear as a big white box – only the content of the UIWebView to appear. How to do it? myWebView.opaque = NO; myWebView.backgroundColor = [UIColor clearColor]; [myWebView loadHTMLString: @"<html><body style='background-color: transparent'> Content Here</body></html>" baseURL:nil]; The above [...]

Comments (2)

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 [...]

Comments (2)

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 [...]

Comments (7)

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 [...]

Comments (4)

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, backgroundImage.frame.size.height+200)]; } You must call setContentSize and pass it an object which has a greater size [...]

Comments (13)

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 [...]

Leave a Comment