The following code works perfectly from iOS 5 to 6.1. I even have applications in store with that code:
-(void)showActivityIndicator
{
if(!mLoadingView)
I had to fix this problem very quickly, hence I have built an iOS7 UIAlertView-style UIView with its animations, which can be extended with any custom content.
There might be others who can use my solution, so I made the whole code available on Github.

Also, if you want to keep using the UIAlertView under previous OS versions, you have to fork the code. It might be as bad as it sounds, I'm using the following:
float sysVer = [[[UIDevice currentDevice] systemVersion] floatValue];
if (sysVer < 7) {
// your old solution
} else {
.. // iOS7 dialog code
}
(Please be aware that this is by no means a real solution - if Apple doesn't want us to use the dialogs for all sorts of things, then we probably shouldn't.)