Aurora for iPad & iPhone

Thursday 17 Jun 2010 17:05

If you have an iPad, and looking for a fun way to make music then this software is for you. Aurora is a pattern based sequencer modelled on the Yamaha Tenori-On that we all know and love. The features are pretty comprehensive so if you are a seasoned musician there is a tremendous amount of tweakability at your fingertips.

iPhone: Modal Dialogs

Sunday 11 Apr 2010 19:48

If like me you come from a Windows programmer background then you might be surprised at the lack of support for modal dialogs in the iPhone OS. Apple provide you with a UIAlertView which is great for on screen prompts and confirmations, but using them can be quite tedious and require a lot more code than is often neccessary.

Instead you have to provide delegates which are called once the user selects an option. In other words your code does not stop and wait for a return value. Whilst this has its benefits in terms of multitasking, your code can get quite messy as you chain these delegates together.

There is another way which involves creating a custom UIAlertView class and a run loop. The code should be self explanatory.

iPhone: Creating a custom UIAlertView Busy Dialog

Wednesday 31 Mar 2010 21:34

Have you ever wanted to create a "Please Wait" dialog on the iPhone without having to implement a custom UIView? In this article I explain how to cusomize a UIAlertView dialog in order to achieve the same effect.

iPhone: Creating a custom UIAlertView Busy Dialog

Wednesday 31 Mar 2010 17:59

One of the major problems facing iPhone developers, especially those coming from a Windows environment is the lack of dialogs. We use dialogs when we require user input or need to display feedback. I recently needed to display a 'Please Wait' dialog whilst downloading files from a web server, and found a way to do this using a UIAlertView.

The iPhone's UIAlertView generally displays an on screen message allowing the user to select one or more options as in the image below.

In the case of a "Please Wait" dialog we don't require any buttons and need to insert a UIActivity indicator inside the dialog. Generally speaking you can embed most UI elements inside a UIAlertView, but to do this you need to expand the dialog, which you can do by inserting a series of returns in the message body. In my case removing the buttons gives me ample room to insert the activity indicator.

Please pay special attention to the while() loop at the end of the WaitPrompt() function. This section of code executes the main run loop for 250ms which is enough time for the OS to animate the UIAlertView onto the display. If you omit this section of code the chances are the dialog would not display until your processing is complete.

Programming Tips

Friday 12 Mar 2010 21:43

In my real life I've been a software engineer and C++ programmer for the past 20+ years! (A fact I was only reminded of today, and one that I don't like to contemplate for too long).

I've worked on many platforms including Windows, Windows Mobile, iPhone, DS, DSi and many more. I know from experience how difficult it can be to find good information and tutorials. I am not quite sure how this section is going to pan out, and if I will be posting tutorials or code snippits.