简体   繁体   English

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

[英]how to get images for ipad custom keyboard

Does anyone know how to get the button images and gradients for a custom ipad keyboard? 有谁知道如何获得自定义ipad键盘的按钮图像和渐变? 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. 我有背景渐变值,我可以创建一个CGGradient(以及随后的UIImage)来获取背景。 The problem is when I try to set the background of a UIButton as a UIImage, i end up getting a square button. 问题是当我尝试将UIButton的背景设置为UIImage时,我最终得到一个方形按钮。 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. 我想我可以为每个按钮获得一个png,但这看起来很傻。

Thanks! 谢谢!

My UX Designer said that they appear to be Photoshopped images, so he was going to create them for me. 我的UX设计师说他们看起来是Photoshop图像,所以他打算为我创建它们。 Apple does not typically make their graphics accessible except when defined in an non-mutable or opaque way (ie, UIBarButtonSystemItemCancel). 除非以非可变或不透明的方式定义(即UIBarButtonSystemItemCancel),否则Apple通常不会访问其图形。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM