On iOS 5 you will need to use the presentingViewController selector instead of theparentViewController selector.