I have two view controllers, the Home and the other that is showed by a cocoacontrol animation (MJPopupViewController) and idn the one that is showed when you push a button all the background changes, but I dont know how to change the home view controller`s background because they are not in a navigation so I cant use a self.parentViewController casting, so how can I do this? Heres the code:
- (IBAction)purple:(id)sender {
self.view.backgroundColor = [UIColor MyPurple];
HomeViewController *home = (HomeViewController *) self.parentViewController; <-- this didnt work, I also tried only self....
home.view.backgroundColor = [UIColor purpleColor];
}
So I need your help, Im starting so I hope you understand, thanks!