我可以将图像设置为UINavigationBar的标题吗? [英] Can I set image as a title to UINavigationBar?

查看:109
本文介绍了我可以将图像设置为UINavigationBar的标题吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以将某些图片设置为导航栏的标题?

Is it possible to set some image as title of Navigation bar?

我认为NYTimes应用程序使用导航栏,标题看起来像图像文件为什么看来NavigationBar是因为他们使用右键搜索)

I think NYTimes application used a Navigation bar and title is look like image file.(the reason why it's seems NavigationBar is becuase they use right button to search)

干杯。

推荐答案

您可以使用ImageView作为UINavigationItem.titleView属性,例如:

You can use an ImageView for the UINavigationItem.titleView property, something like:

self.navigationItem.titleView = myImageView;

这篇关于我可以将图像设置为UINavigationBar的标题吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆