iOS应用store 有一个蓝色的圆形边框按钮,用于购买/下载应用程序.
在我的应用程序中,你可以下载额外的内容,我想有一个类似的按钮,只是因为它看起来对用户来说很熟悉.
如果你不知道,我的意思是:这些按钮,比如"$3.99"
这怎麽可能?
iOS应用store 有一个蓝色的圆形边框按钮,用于购买/下载应用程序.
在我的应用程序中,你可以下载额外的内容,我想有一个类似的按钮,只是因为它看起来对用户来说很熟悉.
如果你不知道,我的意思是:这些按钮,比如"$3.99"
这怎麽可能?
你可以很容易地操纵你的按钮.
// assuming you have a UIButton or more generally a UIView called buyButton
buyButton.layer.cornerRadius = 2;
buyButton.layer.borderWidth = 1;
buyButton.layer.borderColor = [UIColor blueColor].CGColor;
// (note - may prefer to use the tintColor of the control)
您可以调整其中的每一个,以获得您想要的 colored颜色 和边框效果.
您还必须在要使用CALayers的任何文件中添加导入
#import <QuartzCore/QuartzCore.h>