UIBarButtonItem 就像 Facebook 的 Lines

发布于 2024-12-23 01:01:59 字数 422 浏览 3 评论 0原文

如何制作像 Facebook 用于导航那样的 UIBarButtonItem?我尝试搜索并创建图像,但我就是无法让它看起来正确。这是我尝试制作的按钮的示例: 更改宽度UIBarButtonItem什么是开发像 Facebook 新 iOS 应用程序那样的侧滑菜单的最佳方法是什么?

感谢任何帮助,并提前致谢。

How do you make a UIBarButtonItem like the one Facebook uses for their Navigation? I've tried to search and create an image, but I just can't get it to look right. Here's an example of the button I'm trying to make: Change the width of an UIBarButtonItem and What's the best way to develop a sideswipe menu like the one in Facebook's new iOS app?

Any help appreciated and thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

凑诗 2024-12-30 01:01:59

您可以创建仅包含三条线或矩形的图像。设计起来应该非常简单。您甚至可以在预览中执行此操作。 UIBarButtonItem 仅使用 Alpha 通道。

然后使用自定义图像init你的UIBarButtonItem,它应该看起来像这样。

You can create an image that just has the three lines - or rectangles. It should be pretty simple to design. You could even do it in Preview. UIBarButtonItem just uses the alpha channel.

Then init your UIBarButtonItem with custom image and it should look like that.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文