如何制作App-Store-esque购买按钮?

时间:2016-11-10 20:30:59

标签: ios swift user-interface

我正在将app购买添加到应用中,我想制作类似于iOS App Store按钮的购买按钮。在按钮内使文本看起来有点困难。这就是我到目前为止所做的:

let buyButton = UIButton(frame: CGRect(x: 0, y: 0, width: 64, height: 24))
buyButton.setTitle("$0.99", for: [])
buyButton.layer.cornerRadius = 4
buyButton.layer.borderColor = UIColor.blue().cgColor
buyButton.layer.borderWidth = 1
buyButton.setTitleColor(tintColor, for: [])
buyButton.layer.backgroundColor = UIColor.clear.cgColor
buyButton.titleLabel?.font = UIFont.systemFont(ofSize: 14)

有没有人知道App Store按钮的正确大小,角半径和字体规格?我认为该文本应该更加大胆。这是一些屏幕截图比较。我的是红色的。

app store buy button

my buy button

0 个答案:

没有答案
相关问题