Upvote:1

AppDelegate* delegate =  (AppDelegate*)[[UIApplication sharedApplication] delegate];
UIViewController* viewController = [delegate.window.rootViewController topModalController];
...
[viewController.view addSubview:newImageView];

Credit Goes to: stackoverflow.com

Related question with same questions but different answers