Tech Thought

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

Entries for July, 2009

How-To: Convert NSData to NSString

How do you convert an NSData object into it’s string representation?  Should be easy, right?  It is, when you know how… NSString* theString = [[NSString alloc] initWithData:theData encoding:NSASCIIStringEncoding];

Comments (1)

iPhone UIScrollView with UIImageView have issues Interface Builder

Ever wanted to have an image view in a scrollview? Sure, you could directly add it using code, but wouldn’t it be nice to do it in Interface Builder? If you’re like me, you like to leave on the defaults unless absolutely necessary. I had an issue where I added an image view to the [...]

Leave a Comment

How-To: Detect when MKAnnotation, MKAnnotationView is selected

I’m using MapKit to display a satellite map in one of my apps.  I create custom annotations – and it all works great.  However I wanted to be able to play sounds when a user touches one of my MKAnnotation’s on my MapKit MKMapView so that the sound matches the display of the callout (and [...]

Comments (15)

yum fails: Fixing Fedora Core 5 yum repositories

Fedora Core 5 is currently EOL – it’s not supported any more.  As a result, you might find you can’t use yum to install packages any more – you get an error message about this file not existing: http://download.fedora.redhat.com/pub/fedora/linux/core/5/i386/os/repodata/repomd.xml This is because the repositories that yum uses aren’t there anymore.  However you can modify the [...]

Comments (6)

iPhone: Bugged UINavigationController? View doesn’t Scroll.

Developing a networked iPhone application, I had two views that were very similar – so similar in fact that they were copies of one-another with “Sending” renamed to “Receiving”. The idea was to get them both working with different XIB files, and then modify them. The code to load the sending view (from the main [...]

Leave a Comment