Such as the title, how to change neighborhoods button after pressing the button background image, I set up a method for press, but could not find which method is to change the button background image, as well as how to Resouce pictures assigned to another parameters, it is best to give code examples ah, thank you
- (IBAction) buttonDown: (id) sender {
self.tButton.backgroundColor = [UIColor redColor];
}
This is a change of color, change the background image of how to write it?
Reply:
Hyperlinks how other neighborhoods, said
Reply:
? UIImage * newImage = (checked) [UIImage imageNamed: @ "red.png"]: [UIImage imageNamed: @ "green.png"];
[Button setBackgroundImage: newImage forState: UIControlStateNormal];
So add a checked BOOL type variables also facilitate you in exchange for going
Reply:
Good to see the next document. . There are state property. . . . Have the effect of setting the picture according to the different states. .
Reply:
The New hand
Reply:
Thank you've somehow
Reply:
Where can I see the document does not find ah, you like the API, this much-needed
Reply:
No way, ah, just started a few days
Reply:
Then you go to check the development process. Is api. Xcode inside the top right corner of your document. Or read the book to find the base. . Or look under the code. Or hold down the command-click UIButton document of this type can jump inside.
No comments:
Post a Comment