I am trying to create a button with CoreGraphics on monotouch. I can’t figure out how to change the buttons color when its pushed. I tried overriding the TouchesBegan and TouchesEnded methods but I can’t figure out how to change the color.
I am trying to create a button with CoreGraphics on monotouch. I can’t figure
Share
You could handle the background color two ways. You can simply set the BackgroundColor property. This should automatically change the color. Or if you are storing the color as a private variable to be used for FillRect, you need to call SetNeedsDisplay to force a call to Draw.