I created a custom panel item using the following code.
UIImage* image3 = [UIImage imageNamed:@" iphone-btn-next@2x.png "]; CGRect frameimg = CGRectMake(0, 0,57,44); UIButton *someButton = [[UIButton alloc] initWithFrame:frameimg]; [someButton setBackgroundImage:image3 forState:UIControlStateNormal]; [someButton setBackgroundImage:image3 forState:UIControlStateHighlighted]; [someButton addTarget:self action:@selector(flipView) forControlEvents:UIControlEventTouchUpInside]; [someButton setShowsTouchWhenHighlighted:YES]; UIBarButtonItem *mailbutton =[[UIBarButtonItem alloc] initWithCustomView:someButton]; self.navigationItem.rightBarButtonItem=mailbutton;
and it works fine, but the problem is that when I press the button, I see a white color in the center of the button (see screenshot). Can someone suggest me a way to get rid of this?

source share