get iphone window background color

Posted by Jonathan on Stack Overflow See other posts from Stack Overflow or by Jonathan
Published on 2010-03-07T22:04:59Z Indexed on 2010/03/07 23:26 UTC
Read the original article Hit count: 190

Filed under:
|

I've been looking at the Stanford University iphone videos on iTunes U. And saw the teacher trying to do something similar to this code but he realised and said it didn't work though I didn't get why:

- (IBAction)flashPressed{
if (window.backgroundColor == [UIColor magentaColor]){

 window.backgroundColor = [UIColor redColor];
}else {
 window.backgroundColor = [UIColor magentaColor];
}
}

Objective-C, windows based application. Not sure what else you need to know.

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about iphone-sdk