如何获取 ipad 自定义键盘的图像

发布于 2024-10-05 08:21:59 字数 249 浏览 0 评论 0原文

有谁知道如何获取自定义 ipad 键盘的按钮图像和渐变?我希望这些按钮看起来像系统键盘按钮,但上面有不同的文本。我有背景渐变值,我可以创建一个 CGGradient(以及随后的 UIImage)来获取背景。问题是当我尝试将 UIButton 的背景设置为 UIImage 时,我最终得到一个方形按钮。我认为图像将填充圆角矩形按钮的圆角矩形部分,但事实并非如此。

有谁知道这些按钮怎么用吗?我想我可以为每个按钮获取一个 png,但这看起来很愚蠢。

谢谢!

Does anyone know how to get the button images and gradients for a custom ipad keyboard? I would like these buttons to look like the system keyboard buttons, but with different text on them. I have the background gradient values, and I can create a CGGradient(and subsequently UIImage) to get a background. The problem is when I try to set the background of a UIButton as a UIImage, i end up getting a square button. I thought that the image will fill into the rounded rect portion of a rounded rect button, but this is not the case.

Does anyone know how to do these buttons? I guess I could get a png for each button, but that just seems silly.

Thanks!

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

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

发布评论

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

评论(1

口干舌燥 2024-10-12 08:21:59

我的用户体验设计师说它们看起来像是经过 Photoshop 处理的图像,所以他要为我创建它们。 Apple 通常不会使其图形可访问,除非以不可变或不透明的方式定义(即 UIBarButtonSystemItemCancel)。

My UX Designer said that they appear to be Photoshopped images, so he was going to create them for me. Apple does not typically make their graphics accessible except when defined in an non-mutable or opaque way (i.e., UIBarButtonSystemItemCancel).

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