使固定大小的圆形按钮作为iPhone SDK中的图像 [英] Make fix size round button as image in iphone sdk

查看:31
本文介绍了使固定大小的圆形按钮作为iPhone SDK中的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个应用程序,在其中我需要将按钮作为图像(如我上传的那样).

I am developing an application in which I need to round button as image (as I uploaded).

它显示两个角是笔直的,其余是圆形.我尝试了 mybutton.layer.cornerRadius ,但是使整个图像变圆了.我还尝试仅制作自定义按钮,但它在图像周围的按钮中留有多余的空间,我需要修复大小按钮,如图所示.请帮我.提前致谢.快乐的一天.

It Show two corner are straight and the rest is in round shape. I tried withmybutton.layer.cornerRadius but make round whole image. I also tried to just make custom button but it leave extra space in button around image i need to fix size button as image show. Please help me. Thanks in advance. Happy Day.

推荐答案

这是一个很好的教程:

http://iphonedevelopment.blogspot.in/2010/03/不规则形状的uibuttons.html

您可以从此处下载代码

https://github.com/ole/OBShapedButton

希望这会有所帮助

这篇关于使固定大小的圆形按钮作为iPhone SDK中的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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