Change background color of UIViewController from other UIViewController
I have allocated a UIviewController ontop of another one. I would like to
change the color of the other one from this new controller, but I don't
know how. I tried this:
-(IBAction)sliderValueChanged:(UISlider *)sender
{
NSLog(@"slider value = %f", sender.value);
ViewController1.view.backgroundColor = [UIColor
colorWithRed:(160/sender.value) green:(97/sender.value)
blue:(5/sender.value) alpha:0.6];
}
and imported the ViewController1, but it gives an error. If I put
self.view it will work fine but not on ViewController1. How can I do this?
No comments:
Post a Comment