I have a UITableView where I am displaying a list of data. I would like to have a logo instead of just text for the header portion of the view. The code below gives me just the text.
Any ideas on how to get the image in there?
- (void)viewDidLoad
{
[super viewDidLoad];
self. = @"Videos";
To get an icon in the navigation bar (basically what the Facebook app does) use the navigationItem’s titleView property. You can put an arbitrary UIView there, and a UIImageView with the logo on a transparent background would give the same effect that Facebook uses. Do this in viewDidLoad and you’re set.
Any view controller can use a UINavigationItem, so if you’re not using a navigation controller you should still be able to get one.
Alternately, just add a UIToolbar wherever it makes sense, and give it a UIBarButtonItem with a custom view set to a UIImageView.