如何获取 ipad 自定义键盘的图像
有谁知道如何获取自定义 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我的用户体验设计师说它们看起来像是经过 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).