Custom logo on top of UINavigationBar?

前端 未结 2 1693
误落风尘
误落风尘 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: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];
    

提交回复
热议问题