1
This commit is contained in:
parent
9bf3fa9b0f
commit
f595c881b8
@ -2734,7 +2734,7 @@
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = Fableon/Fableon.entitlements;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
CURRENT_PROJECT_VERSION = 2;
|
||||
DEVELOPMENT_TEAM = 6XALB8RSYF;
|
||||
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
@ -2777,7 +2777,7 @@
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = Fableon/Fableon.entitlements;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
CURRENT_PROJECT_VERSION = 2;
|
||||
DEVELOPMENT_TEAM = 6XALB8RSYF;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
INFOPLIST_FILE = Fableon/Source/Info.plist;
|
||||
|
||||
@ -27,7 +27,7 @@ class FALabel: UILabel {
|
||||
|
||||
override var intrinsicContentSize: CGSize {
|
||||
let size = super.intrinsicContentSize
|
||||
return .init(width: size.width + borderLineWidth, height: size.height)
|
||||
return .init(width: size.width + borderLineWidth, height: size.height + borderLineWidth)
|
||||
}
|
||||
|
||||
override func drawText(in rect: CGRect) {
|
||||
@ -58,7 +58,7 @@ class FALabel: UILabel {
|
||||
|
||||
let textSize = self.attributedText?.boundingRect(with: rect.size, options: [.usesLineFragmentOrigin, .usesFontLeading], context: nil).size ?? .zero
|
||||
let x = borderLineWidth / 2
|
||||
let y = 0.0
|
||||
let y = borderLineWidth / 2
|
||||
let textRect = CGRect(x: x, y: y, width: textSize.width, height: textSize.height)
|
||||
|
||||
|
||||
|
||||
@ -75,7 +75,7 @@ class FAPayRetainAlert: FABaseAlert {
|
||||
|
||||
let view = UICollectionView(frame: .zero, collectionViewLayout: layout)
|
||||
view.backgroundColor = .clear
|
||||
view.isScrollEnabled = false
|
||||
view.isScrollEnabled = true
|
||||
view.showsVerticalScrollIndicator = false
|
||||
view.dataSource = self
|
||||
view.delegate = self
|
||||
@ -104,6 +104,8 @@ extension FAPayRetainAlert {
|
||||
contentView.layer.cornerRadius = 0
|
||||
contentView.layer.masksToBounds = true
|
||||
|
||||
closeButton.setImage(UIImage(named: "close_icon_02"), for: .normal)
|
||||
|
||||
contentView.addSubview(bgView)
|
||||
contentView.addSubview(titleLabel)
|
||||
contentView.addSubview(countdownView)
|
||||
@ -111,23 +113,28 @@ extension FAPayRetainAlert {
|
||||
contentView.addSubview(collectionView)
|
||||
|
||||
|
||||
closeButton.snp.remakeConstraints { make in
|
||||
make.centerX.equalToSuperview()
|
||||
make.top.equalTo(contentView.snp.bottom).offset(14)
|
||||
}
|
||||
|
||||
bgView.snp.makeConstraints { make in
|
||||
make.edges.equalToSuperview()
|
||||
}
|
||||
|
||||
titleLabel.snp.makeConstraints { make in
|
||||
make.top.equalToSuperview().offset(143)
|
||||
make.top.equalToSuperview().offset(140)
|
||||
make.centerX.equalToSuperview()
|
||||
make.right.lessThanOrEqualToSuperview().offset(0)
|
||||
}
|
||||
|
||||
countdownView.snp.makeConstraints { make in
|
||||
make.left.equalToSuperview().offset(FAPayRetainAlertData.Layout.countdownLeft)
|
||||
make.top.equalTo(titleLabel.snp.bottom).offset(2)
|
||||
make.centerX.equalToSuperview()
|
||||
make.top.equalTo(titleLabel.snp.bottom).offset(0)
|
||||
}
|
||||
|
||||
bonusTagView.snp.makeConstraints { make in
|
||||
make.top.equalTo(titleLabel.snp.bottom).offset(35)
|
||||
make.top.equalTo(titleLabel.snp.bottom).offset(30)
|
||||
make.centerX.equalToSuperview()
|
||||
make.right.lessThanOrEqualToSuperview().offset(-10)
|
||||
make.height.equalTo(FAPayRetainAlertData.Layout.bonusTagHeight)
|
||||
@ -185,6 +192,7 @@ extension FAPayRetainAlert {
|
||||
}
|
||||
|
||||
private static let defaultCountdownSeconds = 4 * 60 * 60
|
||||
// private static let defaultCountdownSeconds = 10
|
||||
private static let countdownEndTimeKey = "FAPayRetainCountdownEndTime"
|
||||
private var countdownTimer: Timer?
|
||||
private var remainingSeconds: Int = 0
|
||||
@ -436,7 +444,7 @@ final class FAPayRetainPackCell: UICollectionViewCell {
|
||||
view.fa_locations = [0, 1]
|
||||
view.fa_startPoint = .init(x: 0, y: 0.5)
|
||||
view.fa_endPoint = .init(x: 1, y: 0.5)
|
||||
view.layer.cornerRadius = FAPayRetainAlertData.Layout.priceSize.height / 2
|
||||
view.layer.cornerRadius = 20
|
||||
view.layer.masksToBounds = true
|
||||
view.layer.borderWidth = 1
|
||||
view.layer.borderColor = UIColor.fa_hex(0xFFFFFF).cgColor
|
||||
@ -526,12 +534,15 @@ final class FAPayRetainPackCell: UICollectionViewCell {
|
||||
|
||||
priceView.snp.makeConstraints { make in
|
||||
make.right.equalToSuperview().offset(-14)
|
||||
make.top.equalToSuperview().offset(FAPayRetainAlertData.Layout.priceTop)
|
||||
make.size.equalTo(FAPayRetainAlertData.Layout.priceSize)
|
||||
make.centerY.equalToSuperview()
|
||||
make.height.equalTo(40)
|
||||
// make.width.lessThanOrEqualTo(90)
|
||||
make.width.greaterThanOrEqualTo(90)
|
||||
}
|
||||
|
||||
priceLabel.snp.makeConstraints { make in
|
||||
make.center.equalToSuperview()
|
||||
make.right.lessThanOrEqualToSuperview().offset(-10)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -15,11 +15,6 @@ enum FAPayRetainAlertData {
|
||||
|
||||
static let countdown = Countdown(hours: "03", minutes: "29", seconds: "55")
|
||||
|
||||
static let packItems: [PackItem] = [
|
||||
PackItem(coinCount: 3500, bonusText: "+700 free coins", priceText: "$4.99"),
|
||||
PackItem(coinCount: 3500, bonusText: "+700 free coins", priceText: "$4.99"),
|
||||
PackItem(coinCount: 3500, bonusText: "+700 free coins", priceText: "$4.99")
|
||||
]
|
||||
|
||||
static let defaultSelectedIndex = -1
|
||||
static let defaultCenterIndex = 1
|
||||
@ -30,12 +25,6 @@ enum FAPayRetainAlertData {
|
||||
let seconds: String
|
||||
}
|
||||
|
||||
struct PackItem {
|
||||
let coinCount: Int
|
||||
let bonusText: String
|
||||
let priceText: String
|
||||
}
|
||||
|
||||
struct Assets {
|
||||
// 资源名集中管理,便于从 Assets.xcassets 替换
|
||||
static let background = "pay_retain_bg_image"
|
||||
@ -52,7 +41,6 @@ enum FAPayRetainAlertData {
|
||||
|
||||
static let titleTop: CGFloat = 164
|
||||
static let countdownTop: CGFloat = 72
|
||||
static let countdownLeft: CGFloat = 10
|
||||
static let bonusTagTop: CGFloat = 105
|
||||
static let bonusTagLeft: CGFloat = 22
|
||||
static let bonusTagHeight: CGFloat = 32
|
||||
@ -63,8 +51,7 @@ enum FAPayRetainAlertData {
|
||||
static let packItemSpacing: CGFloat = 10
|
||||
static let packListHeight: CGFloat = 224
|
||||
|
||||
static let priceSize = CGSize(width: 97, height: 40)
|
||||
static let priceTop: CGFloat = 14
|
||||
|
||||
static let coinStackLeft: CGFloat = 62
|
||||
static let coinStackTop: CGFloat = 15
|
||||
static let bonusTopSpacing: CGFloat = 5
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user