Custom logo on top of UINavigationBar?

I read a lot of queries about a full-featured UINavigationBarbackground, but I want to use the default logo instead of the logo UINavigationBar. Preferably, I would like to apply it to a subclass UINavigationBarcalled CustomNavigationBar.

+3
source share
2 answers

Neat tricks, Shadow.

If you just want to add a logo instead of a name, it's easy. Set titleView to your navigation element, for example:

UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Logo"]];
self.navigationItem.titleView = imageView;
[imageView release];
+28
source

Source: https://habr.com/ru/post/1741180/


All Articles