Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
I'm not sure if this is correct, but you might be able to close it by calling this:

-[UIModalView dismissWithClickedButtonIndex:animated:]

Take a look at the docs on that (UIModalView is the superclass of UIAlertView) and see if it works.
 
Thanks! That worked.

I had read the UIModalView methods, but didn't think about calling this manually (as opposed to being triggered by the cancel button).

If anyone is interested in the code:
Code:
//Create UIAlertView alert
alert = [[UIAlertView alloc] initWithTitle:@"Alert Title" message:nil delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles: nil];

//In another function
[alert dismissWithClickedButtonIndex:0 animated:TRUE];
 
Yeah, I thought at first from reading the description (that could probably be changed a bit) that it sounded like it should be a delegate method or something, but it wasn't marked as such so might as well give it a try. Its probably set as the action for a UIControlEventTouchUpInside on the buttons when the view is created, but I can't see any side effects to calling it directly.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.