简体   繁体   English

如何在iPhone应用程序中实现半圆形按钮

[英]How can I implement semicircle-shaped buttons in iPhone applications

I got a iPhone app design made in Photoshop. 我在Photoshop中制作了一个iPhone应用程序设计。 I converted the PSD file to PNG format. 我将PSD文件转换为PNG格式。

I found it difficult to implement, especially on some portions like semicircle-shaped buttons. 我发现很难实现,特别是在半圆形按钮等某些部分。

How can I implement this semicircle-shape as two buttons? 如何将这个半圆形状实现为两个按钮?

在此处输入图片说明

You can try the following link. 您可以尝试以下链接。 It works amazingly 它的效果惊人

Visit http://iphonedevelopment.blogspot.in/2010/03/irregularly-shaped-uibuttons.html 请访问http://iphonedevelopment.blogspot.in/2010/03/irregularly-shaped-uibuttons.html

Draw two quarter circle images in Photoshop, saved at PNG files. 在Photoshop中绘制两个四分之一圆的图像,保存为PNG文件。 In your nib file make two custom buttons the size of the quarter circles, each with one of these quarter circle images. 在您的笔尖文件中,制作两个自定义按钮,其大小为四分之一圆,每个按钮都具有这些四分之一圆图像之一。 Place the two buttons next to each other. 将两个按钮彼此相邻放置。 You can embellish the buttons by drawing the various states of the button as separate PNG files, and add those images to the nib file definition of the buttons. 您可以通过将按钮的各种状态绘制为单独的PNG文件来修饰按钮,并将这些图像添加到按钮的nib文件定义中。

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

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