Commit 28c5d648 authored by shenyong's avatar shenyong

fix bug

parent 8dfd80ad
...@@ -14,9 +14,9 @@ extension AppDelegate{ ...@@ -14,9 +14,9 @@ extension AppDelegate{
func setupDynamicShortcuts() { func setupDynamicShortcuts() {
let shortcutItem = UIApplicationShortcutItem( let shortcutItem = UIApplicationShortcutItem(
type: "com.app.phonemanager.iap.distance", type: "com.app.phonemanager.iap.distance",
localizedTitle: "Unlock Special Offers", localizedTitle: "🎁 Unlock Special Offers",
localizedSubtitle: "A Special Offer Just for You!🎁", localizedSubtitle: "A Special Offer Just for You!",
icon: UIApplicationShortcutIcon(), //UIApplicationShortcutIcon(templateImageName: "icon_gift_sa"), //UIApplicationShortcutIcon(systemImageName: "star.fill"), icon: UIApplicationShortcutIcon(systemImageName: "chevron.right"), //UIApplicationShortcutIcon(templateImageName: "icon_gift_sa"), //UIApplicationShortcutIcon(systemImageName: "star.fill"),
userInfo: nil userInfo: nil
) )
UIApplication.shared.shortcutItems = [shortcutItem] UIApplication.shared.shortcutItems = [shortcutItem]
......
...@@ -62,26 +62,26 @@ class PayDistanceViewController: UIViewController { ...@@ -62,26 +62,26 @@ class PayDistanceViewController: UIViewController {
distanceL = UILabel() distanceL = UILabel()
distanceL.text = "50% Discount" distanceL.text = "50% Discount"
distanceL.textAlignment = .center distanceL.textAlignment = .center
distanceL.font = UIFont.systemFont(ofSize: 40, weight: .semibold) distanceL.font = UIFont.systemFont(ofSize: 40.RW(), weight: .semibold)
distanceL.textColor = UIColor.colorWithHex(hexStr: "#111111") distanceL.textColor = UIColor.colorWithHex(hexStr: "#111111")
scrollView.addSubview(distanceL) scrollView.addSubview(distanceL)
annual = UILabel() annual = UILabel()
annual.text = "Annual visit" annual.text = "Annual visit"
annual.textAlignment = .center annual.textAlignment = .center
annual.font = UIFont.systemFont(ofSize: 18, weight: .semibold) annual.font = UIFont.systemFont(ofSize: 18.RW(), weight: .semibold)
annual.textColor = UIColor.colorWithHex(hexStr: "#111111") annual.textColor = UIColor.colorWithHex(hexStr: "#111111")
scrollView.addSubview(annual) scrollView.addSubview(annual)
yearDistacePrice = UILabel() yearDistacePrice = UILabel()
yearDistacePrice.font = UIFont.systemFont(ofSize: 14,weight: .semibold) yearDistacePrice.font = UIFont.systemFont(ofSize: 14.RW(),weight: .semibold)
yearDistacePrice.textColor = UIColor.colorWithHex(hexStr: "#111111") yearDistacePrice.textColor = UIColor.colorWithHex(hexStr: "#111111")
yearDistacePrice.text = ""//"$39.99 $19.99 / Year" yearDistacePrice.text = ""//"$39.99 $19.99 / Year"
yearDistacePrice.textAlignment = .center yearDistacePrice.textAlignment = .center
scrollView.addSubview(yearDistacePrice) scrollView.addSubview(yearDistacePrice)
cancelLabel = UILabel() cancelLabel = UILabel()
cancelLabel.font = UIFont.systemFont(ofSize: 12,weight: .semibold) cancelLabel.font = UIFont.systemFont(ofSize: 12.RW(),weight: .semibold)
cancelLabel.textColor = UIColor.colorWithHex(hexStr: "#0082FF") cancelLabel.textColor = UIColor.colorWithHex(hexStr: "#0082FF")
cancelLabel.text = "Cancel at any time" cancelLabel.text = "Cancel at any time"
cancelLabel.textAlignment = .center cancelLabel.textAlignment = .center
...@@ -90,8 +90,8 @@ class PayDistanceViewController: UIViewController { ...@@ -90,8 +90,8 @@ class PayDistanceViewController: UIViewController {
payBtn = UIButton() payBtn = UIButton()
payBtn.setTitle("Get discounts", for: .normal) payBtn.setTitle("Get discounts", for: .normal)
payBtn.setTitleColor(.white, for: .normal) payBtn.setTitleColor(.white, for: .normal)
payBtn.titleLabel?.font = UIFont.systemFont(ofSize: 18, weight: .semibold) payBtn.titleLabel?.font = UIFont.systemFont(ofSize: 18.RW(), weight: .semibold)
payBtn.layer.cornerRadius = 30 payBtn.layer.cornerRadius = 30.RW()
payBtn.isEnabled = false payBtn.isEnabled = false
payBtn.addTarget(self, action: #selector(iapPayAction), for: .touchUpInside) payBtn.addTarget(self, action: #selector(iapPayAction), for: .touchUpInside)
payBtn.backgroundColor = UIColor.colorWithHex(hexStr: "#0082FF") payBtn.backgroundColor = UIColor.colorWithHex(hexStr: "#0082FF")
...@@ -118,7 +118,7 @@ class PayDistanceViewController: UIViewController { ...@@ -118,7 +118,7 @@ class PayDistanceViewController: UIViewController {
let appleLabel = UILabel() let appleLabel = UILabel()
appleLabel.font = UIFont.systemFont(ofSize: 10,weight: .medium) appleLabel.font = UIFont.systemFont(ofSize: 10.RW(),weight: .medium)
appleLabel.textColor = UIColor.colorWithHex(hexStr: "#111111") appleLabel.textColor = UIColor.colorWithHex(hexStr: "#111111")
appleLabel.text = " Apple Security Guarantee" appleLabel.text = " Apple Security Guarantee"
scrollView.addSubview(appleLabel) scrollView.addSubview(appleLabel)
...@@ -157,8 +157,8 @@ class PayDistanceViewController: UIViewController { ...@@ -157,8 +157,8 @@ class PayDistanceViewController: UIViewController {
payBtn.snp.makeConstraints { make in payBtn.snp.makeConstraints { make in
make.centerX.equalToSuperview() make.centerX.equalToSuperview()
make.width.equalTo(343) make.width.equalTo(343.RW())
make.height.equalTo(57) make.height.equalTo(57.RW())
make.bottom.equalTo(appleLabel.snp.top).offset(-24) make.bottom.equalTo(appleLabel.snp.top).offset(-24)
} }
...@@ -243,10 +243,10 @@ class PayDistanceViewController: UIViewController { ...@@ -243,10 +243,10 @@ class PayDistanceViewController: UIViewController {
width: 111, width: 111,
height: 37) height: 37)
self.distanceL.frame = CGRect(x: (ScreenW - 270) / 2, self.distanceL.frame = CGRect(x: (ScreenW - CGFloat(300.RW())) / 2,
y: kSafeAreaInsets.top + CGFloat(129.RH()) + dropH + CGFloat(40.RH()), y: kSafeAreaInsets.top + CGFloat(129.RH()) + dropH + CGFloat(40.RH()),
width: 270, width: CGFloat(300.RW()),
height: 40) height: CGFloat(40.RW()))
self.annual.frame = CGRect(x: (ScreenW - 150) / 2, self.annual.frame = CGRect(x: (ScreenW - 150) / 2,
y: self.distanceL.frame.maxY + CGFloat(115.RH()), y: self.distanceL.frame.maxY + CGFloat(115.RH()),
...@@ -258,9 +258,9 @@ class PayDistanceViewController: UIViewController { ...@@ -258,9 +258,9 @@ class PayDistanceViewController: UIViewController {
width: 200, width: 200,
height: 22) height: 22)
self.cancelLabel.frame = CGRect(x: (ScreenW - 150) / 2, self.cancelLabel.frame = CGRect(x: (ScreenW - 200) / 2,
y: self.yearDistacePrice.frame.maxY, y: self.yearDistacePrice.frame.maxY,
width: 150, width: 200,
height: 22) height: 22)
payBtn.alpha = 0 payBtn.alpha = 0
...@@ -270,7 +270,7 @@ class PayDistanceViewController: UIViewController { ...@@ -270,7 +270,7 @@ class PayDistanceViewController: UIViewController {
annual.alpha = 0 annual.alpha = 0
yearDistacePrice.alpha = 0 yearDistacePrice.alpha = 0
cancelLabel.alpha = 0 cancelLabel.alpha = 0
UIView.animate(withDuration: 1.1) { UIView.animate(withDuration: 1) {
self.payBtn.alpha = 1 self.payBtn.alpha = 1
self.dropImage.alpha = 1 self.dropImage.alpha = 1
self.offerImage.alpha = 1 self.offerImage.alpha = 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment