iOS 7圆框按钮 [英] iOS 7 round framed button
本文介绍了iOS 7圆框按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
iOS App Store有一个蓝色圆框按钮,用于购买/下载应用程式。
the iOS App Store has a blue round framed button for buying/downloading apps.
在我的应用程式中,您可以下载其他内容,
In my App you can download additional content and I want to have a similar button, just because it looks familiar to the user.
如果你不知道,我的意思是:这些按钮,例如$ 3.99
If you don't know, what I mean: these buttons, like "$3.99"
这是怎么回事?
推荐答案
您可以操作按钮的CALayer, >
You can manipulate the CALayer of your button to do this pretty easily.
// 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)
您还必须在要使用CALayers的任何文件中添加导入
You will also have to add an import in any file you want to use CALayers
#import <QuartzCore/QuartzCore.h>
这篇关于iOS 7圆框按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文