hi!
i have implemented the following code in my project!
UIImage *add_item_icon = [UIImage imageNamed:@"add_item_icon.png"];
UIImage *img = [UIImage imageNamed:@"add_button.png"];
if(headerButton != nil)
[headerButton release];
headerButton = [[UIButton alloc] init];
headerButton.frame = CGRectMake(0, 0, 320, 42);
headerButton.backgroundColor = [UIColor clearColor];
headerButton.showsTouchWhenHighlighted = YES;
[headerButton setBackgroundImage:img forState:UIControlStateNormal];
[headerButton setTitle:@"Add New Gallery" forState:UIControlStateNormal];
[headerButton setImage:add_item_icon forState:UIControlStateNormal];
headerButton.titleLabel.font = [UIFont systemFontOfSize:16];
headerButton.titleLabel.textColor = [UIColor darkGrayColor];
[headerButton addTarget:self action:@selector(headerButtonClicked:) forControlEvents:UIControlEventTouchUpInside];
//[headerButton setTitleColor:[UIColor darkGrayColor] forState:UIControlStateSelected];
My question is whenever i click the button, the color which is assigned to the title has been changed. The requirement is it should not be like that. Any one pls guide me! as early possible.