Upvote:1

if let presenter = self.presentingViewController?.children[0] as? MainViewController  {
        // access presenters members
}

Credit Goes to: stackoverflow.com

Related question with same questions but different answers