Commit 28c5d648 authored by shenyong's avatar shenyong

fix bug

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