Archive for the ‘Dev Corner’ Category

Converting OS Grid References to Latitude/Longitude on iOS

One of the really cool sources of free but useful data on the net if you’re in the UK is the government’s Open Data site. There is a wealth of information here covering the nation’s health, wealth, policing, housing and environment....

Read more

iOS Video Support – Challenges & Quirks

apple118

There are a great many good things to be said about handling video on the iOS platform: Live Streaming works remarkably well, the playback quality is excellent and the programming interface is, for the most part, easy to use. This works...

Read more

AVFoundation with streamed media

streaming118

I’ve run into a few problems with AVFoundation media management not correctly synchronising video and audio playback when drawing on streamed media over the net. The problem seems to have arisen from two things: having more than a single AVPlayer object...

Read more

JIRA 4.4 Released & Upgraded

This weekend I have upgraded our development systems to JIRA 4.4 (and FishEye/Crucible 2.6.2). I had expected it to be a fiddly and lengthy process but was actually quick and easy. I’ve also finally gotten around to installing the Xcode plug-in...

Read more

Continuous integration with Xcode and Bamboo

One feature that is missing from Apple’s suite of development tools is a means to conduct continuous integration of your code. For the last year and half we’ve been using Atlassian’s brilliant JIRA platform for issue tracking, code management and, more...

Read more

UIWebView iOS inconsistencies

I think many would agree with me when I say that of all iOS visual components, UIWebView is one of the most troublesome. Over the last few days I’ve added a few more reasons to be wary of this class. This...

Read more

What does iOS5 mean to you?

ios5

Yesterday’s first public outing of Apple’s latest mobile operating system, iOS 5, gave us the chance to see some of the exciting new features coming our way later this year. With an overhauled notification system, revamped messaging and the introduction of...

Read more

Finding the device UDID in iOS

Getting hold of a device’s unique identifier, its UDID, can be useful if you need to positively identify a customer’s handset for support purposes or if you wish to key specific data to it.

Luckily, finding it out in your code is really easy, it’s a single line

// Get the device's UDID

NSString *udid = [[UIDevice currentDevice] uniqueIdentifier];

UIColor objects from hex-value colors

Really simple this one: use a macro to create a UIColor object from an RGB hex-value if you’re more familiar with those.

#define UIColorFromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]

Check it out on StackOverflow

Preventing a UIWebView from scrolling

Here’s a quick tip that allows you to stop a UIWebView from scrolling. If you nest these objects inside other scrollable views, stopping them from scrolling themselves will give you a more fluid user experience and the overall scrolling effect you probably intended.

((UIScrollView *)[[video subviews] objectAtIndex: 0]).bounces = NO;

This works because the first subview of a UIWebView is its scrollable container. It’s worth noting that this doesn’t technically break any app submission guidelines to my knowledge – no private APIs are used.