Custom logo on top of UINavigationBar?

前端 未结 2 1701
误落风尘
误落风尘 2021-02-06 17:28

I\'ve read plenty of requests about a full-on custom UINavigationBar background, but what I want is to overlay a logo on the default UINavigationBar in

相关标签:
2条回答
  • 2021-02-06 18:06

    This page has some code you can look at as he explains how to do some custom things to the nav controller. http://web.archive.org/web/20161220074043/http://foobarpig.com/iphone/uinavigationbar-with-solid-color-or-image-background.html

    Here is another reference as well. http://web.archive.org/web/20120815192006/http://www.developers-life.com/custom-uinavigationbar-with-image-and-back-button.html

    0 讨论(0)
  • 2021-02-06 18:16

    Neat tricks, Shadow.

    If you just want to add a logo instead of a title, that's easy. Set the titleView on your navigationItem, like so:

    UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Logo"]];
    self.navigationItem.titleView = imageView;
    [imageView release];
    
    0 讨论(0)
提交回复
热议问题