How to place a UIImage in Navigationbar such that its a logo?

后端 未结 8 770
伪装坚强ぢ
伪装坚强ぢ 2020-12-22 07:30

\"enter\"enterI

8条回答
  •  既然无缘
    2020-12-22 08:13

    Try it like this:

    self.navigationItem.titleView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"logo"]];
    

    Also make sure UIImage is not nil and it does have a valid image.

提交回复
热议问题