User interface (how to change background)
How i may change background for window? I have a Button, set Style "Round rect", set Type "On Off", set State "On"-how i may change background color from gray to blue? And how 开发者_StackOverflow社区i may change background for all app?
Thanks!!!
In iOS window based application , you have to create the link between UserInterface to the Code.
- Add IBAction in your app delegate file. Let say "changeBG"
-(void) IBAction changeBG { self.window.backgroundColor = [UIColor blueColor]; }
- Connect the Interface with code by Open XIB and control-click to AppDelegate, when popup appear select changeBG
For UIControlEvent , I recommend UIControlEventTouchUpInside for beginner. That's it. Hope you can do it.
control-click from your button to
精彩评论