3

I'm trying to set a titleView in the NavigationBar using the following code. It shows correctly on the simulator but it doesn't on the device.

This is my code:

UIImage *imageTitle = [UIImage imageNamed: @"tittle_SW.png"];
UIImageView *imageViewForTitle = [[UIImageView alloc] initWithImage: imageTitle];

self.navigationItem.titleView = imageViewForTitle;
self.navigationItem.titleView.autoresizesSubviews = NO;

I tried using this code in initWithNibName and viewDidLoad, and well, both work on the simulator but it doesn't show anything on the device.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Renexandro
  • 464
  • 5
  • 13

0 Answers0