I have inherited my custom class in my project.i.e instead of using the UIViewController i have inherited my custom class.That custom class is having the button.When I am in firstViewController i have to change the background image of that button.for that I have written
[super.button setBackgroundImage:[UIImage imageNamed:@"whiteButton.png"] forState: UIControlStateNormal];
But it is not changing the background image.
Kindly help me .I have stuccoed here.If it is done then my project will be completed.
“super” calls a class, not an instance, you probably want to call an instance.
if button is a property defined in your superclass and you are in a subclass, then you can directly access to that property, as if it was defined in the subclass, so just try: