Im not sure what im doing wrong. The file name is correct, the style is set to plain. But Im getting a bank white box the size of my image. Im using UINavigationController.
Please assist and thank you thank you in advance.
**FYI I am sorta new to objective c so dont be too hard on me. 😉
UIBarButtonItem *toolbarChannelGuideButton = [[UIBarButtonItem alloc]
initWithImage:[UIImage imageNamed:@"channel-guide-button.png"]
style:UIBarButtonItemStylePlain
target:self
action:@selector(action:)];
self.toolbarItems = [NSArray arrayWithObjects:toolbarChannelGuideButton, nil];
[toolbarChannelGuideButton release];
The reason it was creating the white mask was because the
UIToolBardoesnt allow color images on it by default. The way to accomplish this is creating aUIImagethen assign aUIButtonto that image. Then create aUIBarButtonusinginitWithCustomViewwith theUIButtonas the custom view.Code: