I'm an Irish iPhone developer, currently migrating my skills from the web to Apples most popular mobile computing device. Based in County Leitrim, Ireland and working from home as a freelance developer in PHP, Perl, and Objective-C.

Contact me at andy@luibh.ie.

An iOS Developer Takes on Android

nfarina:

Recently, we released the Android version of Meridian, our platform for building location-based apps.

We didn’t use one of these “Cross Platform!” tools like Titanium. We wrote it, from scratch, in Java, like you do in Android.

We decided it was important to keep the native stuff native, and to respect each platform’s conventions as much as possible. Some conventions are easy to follow, like putting our tabs on the top. Other conventions go deep into the Android Way, like handling Intents, closing old Activities, implementing Search Providers, and being strict about references to help the garbage collector.

Now, our platform leverages HTML5 (buzzword, sorry) in many places for branding and content display, so we got a fair amount of UI for free. But there was much platform code written in Objective-C that needed translation into Java, such as map navigation, directions, and location switching.

So, we rolled up our sleeves, downloaded the Android SDK, and got to work.

Read More

New BrainMints iPhone/iPad Released - BrainMints are fresh thoughts, delivered daily, that give your thinking a lift. Just swipe your screen to pop a new one or tap to share with friends via email, Facebook, Twitter, or LinkedIn. You can also browse BrainMints in thumbnail view or create a collection of your favorites.
Available as a universal binary for use on the iPhone and iPad, and in the app store now. Developed for NewWordCity.com.

New BrainMints iPhone/iPad Released - BrainMints are fresh thoughts, delivered daily, that give your thinking a lift. Just swipe your screen to pop a new one or tap to share with friends via email, Facebook, Twitter, or LinkedIn. You can also browse BrainMints in thumbnail view or create a collection of your favorites.

Available as a universal binary for use on the iPhone and iPad, and in the app store now. Developed for NewWordCity.com.


App Icons for iPhone, iPhone 4 and iPad

When submitting a universal binary which you’re going to be using on ‘normal’ iPhones, the iPhone 4 and the iPad you need to include a separate app icon for each one. These are specified within the APP.plist file as follows:

iPhone and iPad Icon Definitions

The icon.png file size should be 57x57.

The Icon@2x.png should be 114x114.

The Icon-72.png (iPad) is optional but needs to be 72x72 if using it.

Simple enough, but nice to get sorted out before trying to submit the app for review and it gets rejected.

More information from Apple available here.

New Intrade iPhone App Released

So after many months hard work and revisions, the Intrade.com iPhone application has finally made it onto the App Store.

Its an application to accompany the Intrade.com website which allows people to place predictions, and virtually trade, on future events.

Further information and download available from iTunes:

http://itunes.apple.com/ie/app/intrade/id380355142?mt=8

Andy

Activity Indicator in UIToolBar

For a while now Ive been trying to get an activity indicator to show programmatically within a toolbar, and my last attempt resulted in manually adding it to the toolbar within IB. That works nicely if you’ve added the toolbar yourself either within IB or code.

However, using a navigation controller it didn’t appear to be quite so easy because whatever I tried I could not get the activity indicator to actual register in the toolbar. That was until I discovered that you can set the right navigation item of a toolbar to actually be a mini toolbar in and of itself.

Code is as follows:

	// create activity indicator
	CGRect frame = CGRectMake(65.0, 15.0, 25.0, 25.0);  	
	UIActivityIndicatorView *loading = [[UIActivityIndicatorView alloc] initWithFrame:frame];	
	loading.activityIndicatorViewStyle = UIActivityIndicatorViewStyleGray;	
	[loading sizeToFit];  	
	loading.autoresizingMask = (UIViewAutoresizingFlexibleLeftMargin | 
UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleTopMargin | 
UIViewAutoresizingFlexibleBottomMargin);  	
	[loading startAnimating];	
	
	// create mini toolbar to hold button and activity indicator
	UIToolbar* toolbar = [[UIToolbar alloc]
						  initWithFrame:CGRectMake(0, 0, 100, 45)];
	[toolbar setBarStyle: UIBarStyleBlackOpaque];
	
	// create an array for the buttons
	NSMutableArray* buttons = [[NSMutableArray alloc] initWithCapacity:2];		
	
	// create and add spacer to force everything over to the right
	UIBarButtonItem *spacer = [[UIBarButtonItem alloc]
				   initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace
				   target:nil
				   action:nil];
	[buttons addObject:spacer];
	[spacer release];		

	// create and add empty button to hold activity indicator
	UIBarButtonItem *buttonSuggest = [[UIBarButtonItem alloc] 
					 initWithTitle:@"      "
				         style:UIBarButtonItemStyleBordered 
					 target:self 
					 action:nil];	
	[buttons addObject:buttonSuggest];
	[buttonSuggest release];
	
	// put the buttons in the toolbar and release them
	[toolbar setItems:buttons animated:NO];
	[buttons release];	

	// add activity indicator to mini toolbar view
	[toolbar addSubview:loading];
	
	// set the right nav item to be our custom view
	self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] 
                                                   initWithCustomView:toolbar];

	[toolbar release];	

This ends up giving you a tidy button in the top right of the uitoolbar like this:


Its then pretty easy to call the above code from within the click event of an existing right bar button item which will make it look busy when clicked.