diff --git a/MoviaBox.xcodeproj/project.pbxproj b/MoviaBox.xcodeproj/project.pbxproj
index 1d28052..fbaa6e1 100644
--- a/MoviaBox.xcodeproj/project.pbxproj
+++ b/MoviaBox.xcodeproj/project.pbxproj
@@ -257,7 +257,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
- MARKETING_VERSION = 1.0.7;
+ MARKETING_VERSION = 1.0.9;
PRODUCT_BUNDLE_IDENTIFIER = com.thimratv.app;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -303,7 +303,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
- MARKETING_VERSION = 1.0.7;
+ MARKETING_VERSION = 1.0.9;
PRODUCT_BUNDLE_IDENTIFIER = com.thimratv.app;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
diff --git a/MoviaBox/AppDelegate/SceneDelegate.swift b/MoviaBox/AppDelegate/SceneDelegate.swift
index 4596ddf..c7cd35a 100644
--- a/MoviaBox/AppDelegate/SceneDelegate.swift
+++ b/MoviaBox/AppDelegate/SceneDelegate.swift
@@ -27,6 +27,8 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
if let webpageURL = connectionOptions.userActivities.first?.webpageURL {
self.handleOpenAppMessage(webpageURL: webpageURL)
+ } else if let url = connectionOptions.urlContexts.first?.url {
+ self.handleOpenAppMessage(webpageURL: url)
}
window = UIWindow(windowScene: windowScene)
diff --git a/MoviaBox/Base/Extension/UIColor+SPAdd.swift b/MoviaBox/Base/Extension/UIColor+SPAdd.swift
index b08c4f7..142bd6a 100644
--- a/MoviaBox/Base/Extension/UIColor+SPAdd.swift
+++ b/MoviaBox/Base/Extension/UIColor+SPAdd.swift
@@ -524,5 +524,37 @@ extension UIColor {
static func colorFF9924(alpha: CGFloat = 1) -> UIColor {
return color(hex: 0xFF9924, alpha: alpha)
}
+
+ static func colorFFF1D9(alpha: CGFloat = 1) -> UIColor {
+ return color(hex: 0xFFF1D9, alpha: alpha)
+ }
+
+ static func color005786(alpha: CGFloat = 1) -> UIColor {
+ return color(hex: 0x005786, alpha: alpha)
+ }
+
+ static func colorFED095(alpha: CGFloat = 1) -> UIColor {
+ return color(hex: 0xFED095, alpha: alpha)
+ }
+
+ static func colorFFE49E(alpha: CGFloat = 1) -> UIColor {
+ return color(hex: 0xFFE49E, alpha: alpha)
+ }
+
+ static func colorE9BB68(alpha: CGFloat = 1) -> UIColor {
+ return color(hex: 0xE9BB68, alpha: alpha)
+ }
+
+ static func colorFFE18D(alpha: CGFloat = 1) -> UIColor {
+ return color(hex: 0xFFE18D, alpha: alpha)
+ }
+
+ static func colorDDA754(alpha: CGFloat = 1) -> UIColor {
+ return color(hex: 0xDDA754, alpha: alpha)
+ }
+
+ static func color94550E(alpha: CGFloat = 1) -> UIColor {
+ return color(hex: 0x94550E, alpha: alpha)
+ }
}
diff --git a/MoviaBox/Base/Extension/UIFont+SPAdd.swift b/MoviaBox/Base/Extension/UIFont+SPAdd.swift
index 545485e..8258f63 100644
--- a/MoviaBox/Base/Extension/UIFont+SPAdd.swift
+++ b/MoviaBox/Base/Extension/UIFont+SPAdd.swift
@@ -40,4 +40,9 @@ extension UIFont {
static func fontWeight(ofSize: CGFloat, weight: CGFloat) -> UIFont {
return .systemFont(ofSize: ofSize, weight: UIFont.Weight(weight))
}
+
+ static func fontInterExtraBold(ofSize: CGFloat) -> UIFont {
+
+ return .init(name: "Inter-ExtraBold", size: ofSize) ?? fontBold(ofSize: ofSize)
+ }
}
diff --git a/MoviaBox/Class/Home/Controller/SPHomeChildController.swift b/MoviaBox/Class/Home/Controller/SPHomeChildController.swift
index b9279c0..3c92edb 100644
--- a/MoviaBox/Class/Home/Controller/SPHomeChildController.swift
+++ b/MoviaBox/Class/Home/Controller/SPHomeChildController.swift
@@ -7,18 +7,117 @@
import UIKit
-class SPHomeChildController: SPViewController {
+class SPHomeChildController: SPViewController, WMZPageProtocol {
- var topMargins: CGFloat = 10
+
+ lazy var page = 1
+ lazy var dataArr: [SPShortModel] = []
+
+
+ private lazy var layout: UICollectionViewFlowLayout = {
+ let width = floor((kSPScreenWidth - 32 - 13) / 2)
+ let height = 221 / 165 * width + 44
+
+ let layout = UICollectionViewFlowLayout()
+ layout.itemSize = CGSize(width: width, height: height)
+ layout.sectionInset = .init(top: 0, left: 16, bottom: 0, right: 16)
+ layout.minimumInteritemSpacing = 13
+ layout.minimumLineSpacing = 13
+ return layout
+ }()
+
+ private lazy var collectionView: SPCollectionView = {
+ let collectionView = SPCollectionView(frame: .zero, collectionViewLayout: layout)
+ collectionView.delegate = self
+ collectionView.dataSource = self
+// collectionView.sp_addRefreshHeader { [weak self] in
+// self?.handleHeaderRefresh(nil)
+// }
+ collectionView.sp_addRefreshBackFooter(insetBottom: 0) { [weak self] in
+ self?.handleFooterRefresh(nil)
+ }
+ SPHomeShortCell.registerCell(collectionView: collectionView)
+ return collectionView
+ }()
override func viewDidLoad() {
super.viewDidLoad()
-
+ setBackgroundView(isShowGradient: false, bgImage: nil, backgroundColor: .clear)
+ sp_setupUI()
+ requestListDataArr(page: 1, completer: nil)
}
-// override func setBgImageView() { }
-
+ override func handleHeaderRefresh(_ completer: (() -> Void)?) {
+ requestListDataArr(page: 1, completer: completer)
+ }
+
+ override func handleFooterRefresh(_ completer: (() -> Void)?) {
+ requestListDataArr(page: self.page + 1) { [weak self] in
+ self?.collectionView.sp_endFooterRefreshing()
+ }
+ }
+
+ func getMyScrollView() -> UIScrollView {
+ return self.collectionView
+ }
}
+
+extension SPHomeChildController {
+
+ private func sp_setupUI() {
+ view.addSubview(collectionView)
+
+ collectionView.snp.makeConstraints { make in
+ make.edges.equalToSuperview()
+ }
+ }
+
+}
+
+//MARK: -------------- UICollectionViewDelegate & UICollectionViewDataSource --------------
+extension SPHomeChildController: UICollectionViewDelegate, UICollectionViewDataSource {
+
+ func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
+ let cell = SPHomeShortCell.dequeueReusableCell(collectionView: collectionView, indexPath: indexPath)
+ cell.model = dataArr[indexPath.row]
+ return cell
+ }
+
+
+ func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
+ return dataArr.count
+ }
+
+ func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
+ let model = dataArr[indexPath.row]
+
+ let vc = SPPlayerDetailViewController()
+ vc.shortPlayId = model.short_play_id
+ self.navigationController?.pushViewController(vc, animated: true)
+ }
+}
+
+
+extension SPHomeChildController {
+
+ ///获取列表数据
+ private func requestListDataArr(page: Int, completer: (() -> Void)?) {
+ SPHomeAPI.requestHomeList(page: page) { [weak self] listModel in
+ guard let self = self else { return }
+
+ if let list = listModel?.list {
+ if page == 1 {
+ self.dataArr.removeAll()
+ }
+ self.dataArr += list
+
+ self.collectionView.reloadData()
+ self.page = page
+ }
+ completer?()
+ }
+ }
+}
diff --git a/MoviaBox/Class/Home/Controller/SPHomePageController.swift b/MoviaBox/Class/Home/Controller/SPHomePageController.swift
deleted file mode 100644
index 44d85b6..0000000
--- a/MoviaBox/Class/Home/Controller/SPHomePageController.swift
+++ /dev/null
@@ -1,158 +0,0 @@
-//
-// SPHomePageController.swift
-// MoviaBox
-//
-// Created by 曾觉新 on 2025/4/8.
-//
-
-import UIKit
-
-class SPHomePageController: SPViewController {
-
- private var topModel: SPHomeTopModel?
-
- ///是否在请求中
- private var isRequesting = false
-
- private lazy var categoryArr: [SPHomeCategoryModel] = []
-// {
-// let arr = [
-// SPHomeCategoryModel(category_name: "Hot Picks".localized, category_id: nil, viewController: SPHomeViewController()),
-// SPHomeCategoryModel(category_name: "Top 10".localized, category_id: nil, viewController: nil),
-// SPHomeCategoryModel(category_name: "Fresh Drops".localized, category_id: nil, viewController: nil),
-// SPHomeCategoryModel(category_name: "Free".localized, category_id: nil, viewController: nil),
-// ]
-// return arr
-// }()
-
- private lazy var searchButton: SPHomeSearchButton = {
- let button = SPHomeSearchButton()
- button.addTarget(self, action: #selector(handleSearchButton), for: .touchUpInside)
- return button
- }()
-
- private lazy var pageView: JYPageController = {
- let customIndicatorImage = UIImage(named: "page_indicator_icon_01")
- let customIndicator = UIImageView(image: customIndicatorImage)
-
- let pageView = JYPageController()
- pageView.delegate = self
- pageView.dataSource = self
- pageView.config.normalTitleColor = .colorD2D2D2()
- pageView.config.selectedTitleColor = .colorBF6BFF()
- pageView.config.normalTitleFont = 14
- pageView.config.selectedTitleFont = 16
- pageView.config.normalTitleFontWeight = .regular
- pageView.config.selectedTitleFontWeight = .medium
- pageView.config.alignment = .scatter
- pageView.config.customIndicator = customIndicator
- pageView.config.indicatorStyle = .customView
- pageView.config.indicatorWidth = customIndicatorImage?.size.width ?? 0
- pageView.config.indicatorHeight = customIndicatorImage?.size.height ?? 0
- pageView.config.leftPadding = 15
- pageView.config.rightPadding = 15
- pageView.config.itemsMargin = 24
- return pageView
- }()
-
-
-
- override func viewDidLoad() {
- super.viewDidLoad()
- NotificationCenter.default.addObserver(self, selector: #selector(reachabilityDidChangeNotification), name: SPNetworkReachabilityManager.reachabilityDidChangeNotification, object: nil)
-
- sp_setupUI()
-
- requestData()
- }
-
-
- override func viewWillAppear(_ animated: Bool) {
- super.viewWillAppear(animated)
- self.navigationController?.setNavigationBarHidden(true, animated: true)
- }
-
-}
-
-extension SPHomePageController {
-
- private func sp_setupUI() {
- addChild(pageView)
- view.addSubview(pageView.view)
- view.addSubview(searchButton)
-
- pageView.view.snp.makeConstraints { make in
-// make.edges.equalToSuperview()
- make.top.equalToSuperview().offset(kSPStatusbarHeight + 66)
- make.left.right.bottom.equalToSuperview()
- }
-
- searchButton.snp.makeConstraints { make in
- make.left.equalToSuperview().offset(15)
- make.centerX.equalToSuperview()
- make.top.equalToSuperview().offset(kSPStatusbarHeight + 10)
- }
- }
-}
-
-extension SPHomePageController {
-
- @objc private func handleSearchButton() {
- let vc = SPSearchViewController()
- self.navigationController?.pushViewController(vc, animated: true)
- }
-
- @objc private func reachabilityDidChangeNotification() {
- requestData()
- }
-
-}
-
-//MARK: -------------- JYPageControllerDelegate & JYPageControllerDataSource --------------
-extension SPHomePageController: JYPageControllerDelegate, JYPageControllerDataSource {
- func pageController(_ pageController: JYPageController, frameForSegmentedView segmentedView: JYSegmentedView) -> CGRect {
- return .init(x: 0, y: 0, width: kSPScreenWidth, height: 40)
- }
-
- func pageController(_ pageController: JYPageController, frameForContainerView container: UIScrollView) -> CGRect {
- return .init(x: 0, y: 40, width: kSPScreenWidth, height: kSPScreenHeight - kSPTabBarHeight - kSPStatusbarHeight - 66 - 40)
- }
-
- func pageController(_ pageController: JYPageController, titleAt index: Int) -> String {
- return self.categoryArr[index].category_name ?? ""
- }
-
- func childController(atIndex index: Int) -> any JYPageChildContollerProtocol {
- let vc = SPHomeViewController()
- vc.topMargins = 15
- return vc
- }
-
-
- func numberOfChildControllers() -> Int {
- return self.categoryArr.count
- }
-}
-
-
-extension SPHomePageController {
-
- private func requestData() {
- if self.topModel != nil || isRequesting { return }
-
- isRequesting = true
- SPHomeAPI.requestHomeTopData { [weak self] model in
- guard let self = self else { return }
- if let model = model {
- self.topModel = model
- if let category = self.topModel?.category {
- self.categoryArr += category
- }
- self.pageView.reload()
- }
- self.isRequesting = false
- }
-
- }
-
-}
diff --git a/MoviaBox/Class/Home/Controller/SPHomeV2ViewController.swift b/MoviaBox/Class/Home/Controller/SPHomeV2ViewController.swift
new file mode 100644
index 0000000..f63802e
--- /dev/null
+++ b/MoviaBox/Class/Home/Controller/SPHomeV2ViewController.swift
@@ -0,0 +1,366 @@
+//
+// SPHomeV2ViewController.swift
+// MoviaBox
+//
+// Created by 长沙佳儿 on 2025/6/18.
+//
+import UIKit
+
+class SPHomeV2ViewController: SPViewController {
+
+
+ private lazy var viewModel: SPHomeViewModel = SPHomeViewModel()
+
+
+
+ private lazy var requestGroup = DispatchGroup()
+
+ private var isSetupUI = false
+
+ //MARK: UI属性
+ private lazy var logoImageView: UIImageView = {
+ let imageView = UIImageView(image: UIImage(named: "logo_icon_01"))
+ imageView.setContentHuggingPriority(.required, for: .horizontal)
+ imageView.setContentCompressionResistancePriority(.required, for: .horizontal)
+ return imageView
+ }()
+
+ private lazy var searchButton: SPHomeSearchButton = {
+ let button = SPHomeSearchButton()
+ button.addTarget(self, action: #selector(handleSearchButton), for: .touchUpInside)
+ return button
+ }()
+
+ private lazy var allButton: UIButton = {
+ let button = UIButton(type: .custom)
+ button.setImage(UIImage(named: "all_icon_01"), for: .normal)
+ button.setContentHuggingPriority(.required, for: .horizontal)
+ button.setContentCompressionResistancePriority(.required, for: .horizontal)
+ button.addTarget(self, action: #selector(handleAllButton), for: .touchUpInside)
+ return button
+ }()
+
+ private lazy var rewardButton: UIButton = {
+ let button = UIButton(type: .custom)
+ button.setImage(UIImage(named: "reward_icon_01"), for: .normal)
+ button.setContentHuggingPriority(.required, for: .horizontal)
+ button.setContentCompressionResistancePriority(.required, for: .horizontal)
+ button.addTarget(self, action: #selector(handleRewardButton), for: .touchUpInside)
+ return button
+ }()
+
+ private lazy var pageParam: WMZPageParam = {
+ let param = WMZPageParam()
+ param.wTitleArr = ["1"]
+ param.wViewController = { [weak self] index in
+ return SPHomeChildController()
+ }
+ param.wTopSuspension = true
+ //顶部可下拉
+ param.wBounces = true
+ param.wMenuHeight = 0
+ param.wBgColor = .clear
+
+ param.wCustomNaviBarY = { _ in
+ return 0
+ }
+ param.wCustomTabbarY = { _ in
+ return 0
+ }
+ param.wCustomDataViewTopOffset = 0
+ return param
+ }()
+
+ private lazy var pageView: WMZPageView = {
+ let y = kSPStatusbarHeight + 10 + 32 + 34
+ let width = kSPScreenWidth
+ let height = kSPScreenHeight - y - kSPTabBarHeight
+
+ let pageView = WMZPageView(frame: CGRect(x: 0, y: y, width: width, height: height), param: pageParam, parentReponder: self)
+ pageView.param = pageParam
+ pageView.backgroundColor = .clear
+ pageView.downSc?.backgroundColor = .clear
+ pageView.downSc?.dataSource = self
+ pageView.downSc?.isScrollEnabled = true
+ pageView.downSc?.separatorStyle = .none
+ pageView.downSc?.register(SPHomeBannerContentCell.self, forCellReuseIdentifier: SPHomeContentModel.ContentKey.banner.rawValue)
+ pageView.downSc?.register(SPHomeHistoryContentCell.self, forCellReuseIdentifier: SPHomeContentModel.ContentKey.history.rawValue)
+ pageView.downSc?.register(SPHomeNineSquareContentCell.self, forCellReuseIdentifier: SPHomeContentModel.ContentKey.nineSquare.rawValue)
+ pageView.downSc?.register(SPHomeCategoryContentCell.self, forCellReuseIdentifier: SPHomeContentModel.ContentKey.category1.rawValue)
+ pageView.downSc?.register(SPHomeHotContentCell.self, forCellReuseIdentifier: SPHomeContentModel.ContentKey.hot.rawValue)
+ pageView.downSc?.sp_addRefreshHeader(block: { [weak self] in
+ self?.handleHeaderRefresh(nil)
+ })
+
+ return pageView
+ }()
+
+
+
+ private var headerView: SPHomeHeaderView?
+
+ private lazy var playHistoricalView: SPHomePlayHistoricalView = {
+ let view = SPHomePlayHistoricalView()
+ view.isHidden = true
+ return view
+ }()
+
+
+ override func viewDidLoad() {
+ super.viewDidLoad()
+ NotificationCenter.default.addObserver(self, selector: #selector(reachabilityDidChangeNotification), name: SPNetworkReachabilityManager.reachabilityDidChangeNotification, object: nil)
+
+
+
+ if SPNetworkReachabilityManager.manager.isReachable == true {
+ updateAllData(completer: nil)
+ _setupUI()
+ } else {
+ setEmptyView()
+ }
+
+
+ }
+
+ override func viewWillAppear(_ animated: Bool) {
+ super.viewWillAppear(animated)
+ self.navigationController?.setNavigationBarHidden(true, animated: true)
+ }
+
+ override func viewDidAppear(_ animated: Bool) {
+ if hasViewDidAppear {
+ requestPlayHistory()
+ }
+ super.viewDidAppear(animated)
+
+ self.headerView?.isDidAppear = self.isDidAppear
+ }
+
+ override func viewDidDisappear(_ animated: Bool) {
+ super.viewDidDisappear(animated)
+ self.headerView?.isDidAppear = self.isDidAppear
+ }
+
+ override func handleHeaderRefresh(_ completer: (() -> Void)?) {
+ updateAllData { [weak self] in
+ self?.pageView.downSc?.sp_endHeaderRefreshing()
+ }
+ }
+
+// override func handleFooterRefresh(_ completer: (() -> Void)?) {
+// requestListDataArr(page: self.viewModel.page + 1) { [weak self] in
+//// self?.collectionView.sp_endFooterRefreshing()
+// }
+// }
+
+
+}
+
+
+extension SPHomeV2ViewController {
+
+ private func _setupUI() {
+ if isSetupUI { return }
+ isSetupUI = true
+
+// view.addSubview(logoImageView)
+ view.addSubview(searchButton)
+ view.addSubview(allButton)
+ view.addSubview(rewardButton)
+ view.addSubview(pageView)
+ view.addSubview(playHistoricalView)
+
+// logoImageView.snp.makeConstraints { make in
+// make.left.equalToSuperview().offset(16)
+// make.centerY.equalTo(searchButton)
+// }
+
+ searchButton.snp.makeConstraints { make in
+// make.left.equalTo(logoImageView.snp.right).offset(6)
+ make.left.equalToSuperview().offset(16)
+// make.right.equalToSuperview().offset(-16)
+ make.right.equalTo(allButton.snp.left).offset(-4)
+ make.top.equalToSuperview().offset(kSPStatusbarHeight + 10)
+ }
+
+ allButton.snp.makeConstraints { make in
+ make.centerY.equalTo(searchButton)
+// make.right.equalToSuperview().offset(-16)
+ make.right.equalTo(rewardButton.snp.left).offset(-1)
+ }
+
+ rewardButton.snp.makeConstraints { make in
+ make.centerY.equalTo(searchButton)
+ make.right.equalToSuperview().offset(-16)
+ }
+
+
+ playHistoricalView.snp.makeConstraints { make in
+ make.left.equalToSuperview().offset(16)
+ make.centerX.equalToSuperview()
+ make.bottom.equalToSuperview().offset(-4)
+ }
+ }
+}
+
+extension SPHomeV2ViewController {
+ @objc private func handleSearchButton() {
+ let vc = SPSearchViewController()
+ self.navigationController?.pushViewController(vc, animated: true)
+ }
+
+ ///设置无网空页面
+ private func setEmptyView() {
+ if SPNetworkReachabilityManager.manager.isReachable != true {
+ self.addNoNetworkEmptyView { [weak self] in
+ self?.updateEmptyState()
+ }
+ }
+ }
+
+ @objc private func reachabilityDidChangeNotification() {
+ updateEmptyState()
+ }
+
+ ///更新空白页面状态
+ private func updateEmptyState() {
+ if SPNetworkReachabilityManager.manager.isReachable == true {
+ self._setupUI()
+ if viewModel.isEmptyData {
+ self.updateAllData(completer: nil)
+ }
+ self.removeNoNetworkEmptyView()
+ }
+ }
+
+ @objc private func handleAllButton() {
+ let vc = SPAllViewController()
+ self.navigationController?.pushViewController(vc, animated: true)
+ }
+
+ @objc private func handleRewardButton() {
+ let vc = SPRewardsViewController()
+ self.navigationController?.pushViewController(vc, animated: true)
+
+ }
+}
+
+//MARK: -------------- UITableViewDelegate UITableViewDataSource --------------
+extension SPHomeV2ViewController: UITableViewDelegate, UITableViewDataSource {
+
+ func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
+ let model = self.viewModel.contentArr[indexPath.row]
+ let key = model.key ?? .banner
+ let cell = tableView.dequeueReusableCell(withIdentifier: key.rawValue, for: indexPath) as! SPHomeContentCell
+ cell.contentModel = model
+ return cell
+ }
+
+ func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+ return self.viewModel.contentArr.count
+ }
+
+}
+
+
+
+extension SPHomeV2ViewController {
+ private func updateAllData(completer: (() -> Void)?) {
+ self.requestGroup.enter()
+ requestModuleData { [weak self] in
+ self?.requestGroup.leave()
+ }
+ self.requestGroup.enter()
+ requestPlayHistory { [weak self] in
+ self?.requestGroup.leave()
+ }
+ self.requestGroup.enter()
+ requestListDataArr(page: 1) { [weak self] in
+ self?.requestGroup.leave()
+ }
+ self.requestGroup.enter()
+ requestCategoryShortList(id: "3") { [weak self] in
+ self?.requestGroup.leave()
+ }
+// self.requestGroup.enter()
+// requestCategoryShortList(id: "1") { [weak self] in
+// self?.requestGroup.leave()
+// }
+
+
+ self.requestGroup.notify(queue: DispatchQueue.main) {
+ completer?()
+ }
+ }
+
+ ///获取模版数据 包括banner 九宫格等
+ private func requestModuleData(completer: (() -> Void)? = nil) {
+ SPHomeAPI.requestHomeModuleData { [weak self] model in
+ guard let self = self else { return }
+ if let model = model {
+ self.viewModel.moduleModel = model
+ self.pageView.downSc?.reloadData()
+ }
+ self.updateEmptyState()
+ completer?()
+ }
+ }
+
+
+ ///甜宠ID= 3
+ ///虐恋ID=1
+ private func requestCategoryShortList(id: String, completer: (() -> Void)?) {
+
+ SPVideoAPI.requestCategoryShortList(page: 1, id: id) { [weak self] listModel in
+ guard let self = self else { return }
+
+ if let list = listModel?.list {
+ if id == "3" {
+ self.viewModel.categoryDataArr1 = list
+ } else {
+ self.viewModel.categoryDataArr2 = list
+ }
+ self.pageView.downSc?.reloadData()
+ }
+ self.updateEmptyState()
+ completer?()
+ }
+ }
+
+ ///获取播放记录
+ private func requestPlayHistory(completer: (() -> Void)? = nil) {
+ SPVideoAPI.requestPlayHistoryList(page: 1) { [weak self] listModel in
+ guard let self = self else { return }
+ if let list = listModel?.list {
+ self.viewModel.playHistoryArr = list
+ self.pageView.downSc?.reloadData()
+
+ if let model = listModel?.list?.first {
+ self.playHistoricalView.model = model
+ self.playHistoricalView.isHidden = false
+ }
+ }
+ self.updateEmptyState()
+ completer?()
+ }
+ }
+
+ ///获取列表数据
+ private func requestListDataArr(page: Int, completer: (() -> Void)?) {
+ SPHomeAPI.requestHomeList(page: page) { [weak self] listModel in
+ guard let self = self else { return }
+
+ if let list = listModel?.list {
+ if page == 1 {
+ self.viewModel.dataArr.removeAll()
+ }
+ self.viewModel.dataArr += list
+
+// self.collectionView.reloadData()
+ self.viewModel.page = page
+ }
+ self.updateEmptyState()
+ completer?()
+ }
+ }
+}
diff --git a/MoviaBox/Class/Home/Controller/SPHomeViewController.swift b/MoviaBox/Class/Home/Controller/SPHomeViewController.swift
index afcf74d..725ef93 100644
--- a/MoviaBox/Class/Home/Controller/SPHomeViewController.swift
+++ b/MoviaBox/Class/Home/Controller/SPHomeViewController.swift
@@ -7,7 +7,7 @@
import UIKit
-class SPHomeViewController: SPHomeChildController {
+class SPHomeViewController: SPViewController {
private lazy var viewModel: SPHomeViewModel = SPHomeViewModel()
diff --git a/MoviaBox/Class/Home/Model/SPHomeContentModel.swift b/MoviaBox/Class/Home/Model/SPHomeContentModel.swift
new file mode 100644
index 0000000..7e5c472
--- /dev/null
+++ b/MoviaBox/Class/Home/Model/SPHomeContentModel.swift
@@ -0,0 +1,27 @@
+//
+// SPHomeContentModel.swift
+// MoviaBox
+//
+// Created by 长沙佳儿 on 2025/6/18.
+//
+
+import UIKit
+
+class SPHomeContentModel: NSObject {
+
+ enum ContentKey: String {
+ case banner
+ case history
+ ///九宫格
+ case nineSquare
+ case category1
+ case hot
+ case category2
+ }
+
+ var key: ContentKey?
+ var title: String?
+ var list: [SPShortModel]?
+
+ var contentTop: CGFloat = 0
+}
diff --git a/MoviaBox/Class/Home/View/SPHomeBannerContentCell.swift b/MoviaBox/Class/Home/View/SPHomeBannerContentCell.swift
new file mode 100644
index 0000000..f799e15
--- /dev/null
+++ b/MoviaBox/Class/Home/View/SPHomeBannerContentCell.swift
@@ -0,0 +1,103 @@
+//
+// SPHomeBannerContentCell.swift
+// MoviaBox
+//
+// Created by 长沙佳儿 on 2025/6/18.
+//
+
+import UIKit
+
+class SPHomeBannerContentCell: SPHomeContentCell {
+
+ override var contentModel: SPHomeContentModel? {
+ didSet {
+ bannerView.reloadData()
+
+ let bannerModel = contentModel?.list?.first
+ self.bannerBgImageView.sp_setImage(url: bannerModel?.image_url)
+ }
+ }
+
+ private lazy var bannerBgImageView: SPFadeEdgeImageView = {
+ let imageView = SPFadeEdgeImageView()
+ imageView.contentMode = .scaleAspectFill
+ return imageView
+ }()
+
+ private lazy var bannerView: ZKCycleScrollView = {
+ let view = ZKCycleScrollView(frame: .zero, shouldInfiniteLoop: true)
+ view.itemSize = .init(width: 234, height: 336)
+ view.itemAlpha = true
+ view.itemZoomScale = 0.85
+ view.rotationAngle = 12
+ view.itemSpacing = 15
+ view.delegate = self
+ view.dataSource = self
+ view.hidesPageControl = true
+ view.register(SPHomeZoomBannerCell.self, forCellWithReuseIdentifier: "banner")
+
+ return view
+ }()
+
+ override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
+ super.init(style: style, reuseIdentifier: reuseIdentifier)
+
+ sp_setupUI()
+ }
+
+ @MainActor required init?(coder: NSCoder) {
+ fatalError("init(coder:) has not been implemented")
+ }
+}
+
+extension SPHomeBannerContentCell {
+
+ private func sp_setupUI() {
+ contentView.addSubview(bannerBgImageView)
+ contentView.addSubview(bannerView)
+
+ bannerBgImageView.snp.makeConstraints { make in
+ make.top.equalToSuperview()
+ make.centerX.equalToSuperview()
+ make.width.equalTo(kSPScreenWidth)
+ make.height.equalTo(336)
+ }
+
+ bannerView.snp.makeConstraints { make in
+ make.edges.equalToSuperview()
+ make.height.equalTo(336)
+ }
+
+
+ }
+
+}
+
+//MARK: -------------- ZKCycleScrollViewDelegate & ZKCycleScrollViewDataSource --------------
+extension SPHomeBannerContentCell: ZKCycleScrollViewDelegate, ZKCycleScrollViewDataSource {
+
+ func cycleScrollView(_ cycleScrollView: ZKCycleScrollView, cellForItemAt index: Int) -> ZKCycleScrollViewCell {
+ let cell = cycleScrollView.dequeueReusableCell(withReuseIdentifier: "banner", for: index) as! SPHomeZoomBannerCell
+ cell.model = contentModel?.list?[index]
+ return cell
+ }
+
+ func numberOfItems(in cycleScrollView: ZKCycleScrollView) -> Int {
+ return contentModel?.list?.count ?? 0
+ }
+
+ func cycleScrollView(_ cycleScrollView: ZKCycleScrollView, didScrollFromIndex fromIndex: Int, toIndex: Int) {
+ let model = contentModel?.list?[toIndex]
+
+ self.bannerBgImageView.sp_setImage(url: model?.image_url)
+
+ }
+
+ func cycleScrollView(_ cycleScrollView: ZKCycleScrollView, didSelectItemAt index: Int) {
+ let model = contentModel?.list?[index]
+
+ let vc = SPPlayerDetailViewController()
+ vc.shortPlayId = model?.short_play_id
+ self.viewController?.navigationController?.pushViewController(vc, animated: true)
+ }
+}
diff --git a/MoviaBox/Class/Home/View/SPHomeCategoryContentCell.swift b/MoviaBox/Class/Home/View/SPHomeCategoryContentCell.swift
new file mode 100644
index 0000000..d8b0132
--- /dev/null
+++ b/MoviaBox/Class/Home/View/SPHomeCategoryContentCell.swift
@@ -0,0 +1,19 @@
+//
+// SPHomeCategoryContentCell.swift
+// MoviaBox
+//
+// Created by 长沙佳儿 on 2025/6/18.
+//
+
+import UIKit
+
+class SPHomeCategoryContentCell: SPHomeContentCell {
+
+ ///甜宠
+ private lazy var categoryVideoView: SPHomeCategoryVideoView = {
+ let view = SPHomeCategoryVideoView()
+ view.image = UIImage(named: "category_bg_image_01")
+ return view
+ }()
+
+}
diff --git a/MoviaBox/Class/Home/View/SPHomeContentCell.swift b/MoviaBox/Class/Home/View/SPHomeContentCell.swift
new file mode 100644
index 0000000..1a14b17
--- /dev/null
+++ b/MoviaBox/Class/Home/View/SPHomeContentCell.swift
@@ -0,0 +1,16 @@
+//
+// SPHomeContentCell.swift
+// MoviaBox
+//
+// Created by 长沙佳儿 on 2025/6/18.
+//
+
+import UIKit
+
+class SPHomeContentCell: SPTableViewCell {
+
+ let contentToTop: CGFloat = 25
+
+ var contentModel: SPHomeContentModel?
+
+}
diff --git a/MoviaBox/Class/Home/View/SPHomeHistoryContentCell.swift b/MoviaBox/Class/Home/View/SPHomeHistoryContentCell.swift
new file mode 100644
index 0000000..0cacffb
--- /dev/null
+++ b/MoviaBox/Class/Home/View/SPHomeHistoryContentCell.swift
@@ -0,0 +1,45 @@
+//
+// SPHomeHistoryContentCell.swift
+// MoviaBox
+//
+// Created by 长沙佳儿 on 2025/6/18.
+//
+
+import UIKit
+
+class SPHomeHistoryContentCell: SPHomeContentCell {
+
+
+ override var contentModel: SPHomeContentModel? {
+ didSet {
+ playHistoryView.dataArr = contentModel?.list
+
+ playHistoryView.snp.updateConstraints { make in
+ make.top.equalToSuperview().offset(contentModel?.contentTop ?? 0)
+ }
+ }
+ }
+
+ private lazy var playHistoryView: SPHomePlayHistoryView = {
+ let view = SPHomePlayHistoryView()
+ return view
+ }()
+
+
+
+ override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
+ super.init(style: style, reuseIdentifier: reuseIdentifier)
+
+ contentView.addSubview(playHistoryView)
+
+ playHistoryView.snp.makeConstraints { make in
+ make.top.equalToSuperview().offset(0)
+ make.left.right.bottom.equalToSuperview()
+ make.height.equalTo(SPHomePlayHistoryView.contentToTop + 136)
+ }
+ }
+
+ @MainActor required init?(coder: NSCoder) {
+ fatalError("init(coder:) has not been implemented")
+ }
+}
diff --git a/MoviaBox/Class/Home/View/SPHomeHotContentCell.swift b/MoviaBox/Class/Home/View/SPHomeHotContentCell.swift
new file mode 100644
index 0000000..54dc2c0
--- /dev/null
+++ b/MoviaBox/Class/Home/View/SPHomeHotContentCell.swift
@@ -0,0 +1,18 @@
+//
+// SPHomeHotContentCell.swift
+// MoviaBox
+//
+// Created by 长沙佳儿 on 2025/6/18.
+//
+
+import UIKit
+
+class SPHomeHotContentCell: SPHomeContentCell {
+
+
+ private lazy var trendingView: SPHomeTrendingView = {
+ let view = SPHomeTrendingView()
+ return view
+ }()
+
+}
diff --git a/MoviaBox/Class/Home/View/SPHomeNineSquareContentCell.swift b/MoviaBox/Class/Home/View/SPHomeNineSquareContentCell.swift
new file mode 100644
index 0000000..4f30cb1
--- /dev/null
+++ b/MoviaBox/Class/Home/View/SPHomeNineSquareContentCell.swift
@@ -0,0 +1,46 @@
+//
+// SPHomeNineSquareContentCell.swift
+// MoviaBox
+//
+// Created by 长沙佳儿 on 2025/6/18.
+//
+
+import UIKit
+
+class SPHomeNineSquareContentCell: SPHomeContentCell {
+
+ override var contentModel: SPHomeContentModel? {
+ didSet {
+ exploreView.dataArr = contentModel?.list
+ exploreView.titleLabel.text = contentModel?.title
+
+ exploreView.snp.updateConstraints { make in
+ make.top.equalToSuperview().offset(contentModel?.contentTop ?? 0)
+ make.height.equalTo(SPHomeExploreView.contentHeight(dataArr: contentModel?.list ?? []))
+ }
+
+ }
+ }
+
+ private lazy var exploreView: SPHomeExploreView = {
+ let view = SPHomeExploreView()
+ return view
+ }()
+
+ override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
+ super.init(style: style, reuseIdentifier: reuseIdentifier)
+ contentView.addSubview(exploreView)
+
+ exploreView.snp.makeConstraints { make in
+ make.top.equalToSuperview().offset(0)
+ make.left.right.bottom.equalToSuperview()
+ make.height.equalTo(1)
+ }
+
+ }
+
+ @MainActor required init?(coder: NSCoder) {
+ fatalError("init(coder:) has not been implemented")
+ }
+
+}
diff --git a/MoviaBox/Class/Home/View/SPHomePlayHistoricalView.swift b/MoviaBox/Class/Home/View/SPHomePlayHistoricalView.swift
index 038e3df..4b6c2d1 100644
--- a/MoviaBox/Class/Home/View/SPHomePlayHistoricalView.swift
+++ b/MoviaBox/Class/Home/View/SPHomePlayHistoricalView.swift
@@ -18,10 +18,13 @@ class SPHomePlayHistoricalView: UIView {
}
private lazy var bgView: UIView = {
- let view = UIImageView(image: UIImage(named: "home_historical_bg_image_"))
+// let view = UIImageView(image: UIImage(named: "home_historical_bg_image_"))
+ let view = UIView()
+ view.addEffectView(style: .dark)
+ view.addRadius(topLeft: 24, topRight: 24, bottomLeft: 24, bottomRight: 24)
+
+
view.isUserInteractionEnabled = true
-// view.addEffectView(style: .dark)
-// view.addRadius(topLeft: 0, topRight: 24, bottomLeft: 0, bottomRight: 24)
let tap = UITapGestureRecognizer(target: self, action: #selector(handlePlayButton))
view.addGestureRecognizer(tap)
return view
@@ -100,7 +103,7 @@ extension SPHomePlayHistoricalView {
bgView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview()
-// make.height.equalTo(48)
+ make.height.equalTo(48)
}
coverImageView.snp.makeConstraints { make in
diff --git a/MoviaBox/Class/Home/ViewModel/SPHomeViewModel.swift b/MoviaBox/Class/Home/ViewModel/SPHomeViewModel.swift
index cc22b20..72b9dd5 100644
--- a/MoviaBox/Class/Home/ViewModel/SPHomeViewModel.swift
+++ b/MoviaBox/Class/Home/ViewModel/SPHomeViewModel.swift
@@ -13,18 +13,96 @@ class SPHomeViewModel: NSObject {
lazy var dataArr: [SPShortModel] = []
///模版数据
- var moduleModel: SPHomeModuleModel?
+ var moduleModel: SPHomeModuleModel? {
+ didSet {
+ updateContentArr()
+ }
+ }
///分类数据
///甜宠
- var categoryDataArr1: [SPShortModel] = []
+ var categoryDataArr1: [SPShortModel] = [] {
+ didSet {
+ updateContentArr()
+ }
+ }
///虐恋
- var categoryDataArr2: [SPShortModel] = []
+ var categoryDataArr2: [SPShortModel] = [] {
+ didSet {
+ updateContentArr()
+ }
+ }
///历史记录
- var playHistoryArr: [SPShortModel]?
+ var playHistoryArr: [SPShortModel]? {
+ didSet {
+ updateContentArr()
+ }
+ }
+ private(set) lazy var contentArr: [SPHomeContentModel] = []
+
+
+ private func updateContentArr() {
+ contentArr.removeAll()
+
+ if let list = moduleModel?.bannerData, list.count > 0 {
+ let model = SPHomeContentModel()
+ model.key = .banner
+ model.list = list
+ contentArr.append(model)
+ }
+
+ if let list = playHistoryArr, list.count > 0 {
+ let model = SPHomeContentModel()
+ model.key = .history
+ model.list = list
+ if contentArr.count > 0 {
+ model.contentTop = 25
+ }
+ contentArr.append(model)
+ }
+
+ if let list = moduleModel?.nineSquare?.list, list.count > 0 {
+ let model = SPHomeContentModel()
+ model.key = .nineSquare
+ model.title = moduleModel?.nineSquare?.title
+ model.list = list
+ if contentArr.count > 0 {
+ model.contentTop = 25
+ }
+ contentArr.append(model)
+ }
+
+ if categoryDataArr1.count > 0 {
+ let model = SPHomeContentModel()
+ model.key = .category1
+ model.list = categoryDataArr1
+ if contentArr.count > 0 {
+ model.contentTop = 25
+ }
+ contentArr.append(model)
+ }
+
+ if let list = moduleModel?.hotData, list.count > 0 {
+ let model = SPHomeContentModel()
+ model.key = .hot
+ model.list = list
+ if contentArr.count > 0 {
+ model.contentTop = 25
+ }
+ contentArr.append(model)
+ }
+
+// if categoryDataArr2.count > 0 {
+// let model = SPHomeContentModel()
+// model.key = .category1
+// model.list = categoryDataArr2
+// contentArr.append(model)
+// }
+ }
+
var isEmptyData: Bool {
if dataArr.count > 0 || (playHistoryArr?.count ?? 0) > 0 || moduleModel != nil {
return false
diff --git a/MoviaBox/Class/Mine/View/SPMineWalletView.swift b/MoviaBox/Class/Mine/View/SPMineWalletView.swift
index 5e5084f..e40f684 100644
--- a/MoviaBox/Class/Mine/View/SPMineWalletView.swift
+++ b/MoviaBox/Class/Mine/View/SPMineWalletView.swift
@@ -78,6 +78,22 @@ class SPMineWalletView: UIView {
return button
}()
+ private lazy var coinTitleLabel: UILabel = {
+ let label = UILabel()
+ label.font = .fontMedium(ofSize: 14)
+ label.textColor = .colorFFFFFF(alpha: 0.3)
+ label.text = "movia_profile_Coins".localized
+ return label
+ }()
+
+ private lazy var sendCoinTitleLabel: UILabel = {
+ let label = UILabel()
+ label.font = .fontMedium(ofSize: 14)
+ label.textColor = .colorFFFFFF(alpha: 0.3)
+ label.text = "movia_profile_Bonus".localized
+ return label
+ }()
+
private lazy var coinButton: UIButton = {
let button = JXButton(type: .custom)
button.isUserInteractionEnabled = false
@@ -87,11 +103,13 @@ class SPMineWalletView: UIView {
button.space = 2
return button
}()
+
+
///赠送的金币
private lazy var sendCoinButton: UIButton = {
let button = JXButton(type: .custom)
button.isUserInteractionEnabled = false
- button.setImage(UIImage(named: "coin_icon_02"), for: .normal)
+ button.setImage(UIImage(named: "coin_icon_01"), for: .normal)
button.setTitleColor(.colorFFFFFF(), for: .normal)
button.jx_font = .fontMedium(ofSize: 18)
button.space = 2
@@ -99,6 +117,8 @@ class SPMineWalletView: UIView {
}()
+
+
override init(frame: CGRect) {
super.init(frame: frame)
coinButton.setTitle("0", for: .normal)
@@ -135,6 +155,8 @@ extension SPMineWalletView {
moreButton.addSubview(moreIndicatorImageView)
bgView.addSubview(lineView)
bgView.addSubview(storeButton)
+ bgView.addSubview(coinTitleLabel)
+ bgView.addSubview(sendCoinTitleLabel)
bgView.addSubview(coinButton)
bgView.addSubview(sendCoinButton)
@@ -169,17 +191,28 @@ extension SPMineWalletView {
storeButton.snp.makeConstraints { make in
make.right.equalToSuperview().offset(-12)
- make.bottom.equalToSuperview().offset(-21)
+ make.bottom.equalToSuperview().offset(-14)
+ }
+
+ coinTitleLabel.snp.makeConstraints { make in
+ make.left.equalTo(coinButton)
+ make.bottom.equalTo(coinButton.snp.top).offset(-9)
+ }
+
+ sendCoinTitleLabel.snp.makeConstraints { make in
+ make.left.equalTo(sendCoinButton)
+ make.bottom.equalTo(coinTitleLabel)
}
coinButton.snp.makeConstraints { make in
- make.left.equalToSuperview().offset(8)
+ make.left.equalToSuperview().offset(12)
make.centerY.equalTo(storeButton)
+// make.bottom.equalToSuperview().offset(-23)
}
sendCoinButton.snp.makeConstraints { make in
- make.left.equalTo(coinButton.snp.right).offset(10)
- make.centerY.equalTo(storeButton)
+ make.left.equalTo(coinButton.snp.right).offset(30)
+ make.centerY.equalTo(coinButton)
}
}
diff --git a/MoviaBox/Class/Player/View/SPPlayBuyView.swift b/MoviaBox/Class/Player/View/SPPlayBuyView.swift
index 489d342..7032f2a 100644
--- a/MoviaBox/Class/Player/View/SPPlayBuyView.swift
+++ b/MoviaBox/Class/Player/View/SPPlayBuyView.swift
@@ -30,12 +30,11 @@ class SPPlayBuyView: HWPanModalContentView {
return view
}()
- private lazy var indicatorView: UIView = {
- let view = UIView()
- view.backgroundColor = .colorFFFFFF(alpha: 0.4)
- view.layer.cornerRadius = 2.5
- view.layer.masksToBounds = true
- return view
+ private lazy var closeButton: UIButton = {
+ let button = UIButton(type: .custom)
+ button.setImage(UIImage(named: "close_icon_04"), for: .normal)
+ button.addTarget(self, action: #selector(handleCloseButton), for: .touchUpInside)
+ return button
}()
private lazy var titleLabel: UILabel = {
@@ -84,8 +83,25 @@ class SPPlayBuyView: HWPanModalContentView {
return view
}()
+ private lazy var tipTitleLabel: UILabel = {
+ let label = UILabel()
+ label.font = .fontMedium(ofSize: 12)
+ label.textColor = .colorFFFFFF(alpha: 0.7)
+ return label
+ }()
+
+ private lazy var tipTextLabel: UILabel = {
+ let label = UILabel()
+ label.numberOfLines = 0
+ label.textColor = .colorFFFFFF(alpha: 0.5)
+ label.font = .fontRegular(ofSize: 12)
+ return label
+ }()
+
override init(frame: CGRect) {
super.init(frame: frame)
+ tipTitleLabel.text = "movia_store_tips_title_ios".localized
+ tipTextLabel.text = "movia_store_tips_ios".localized.replacingOccurrences(of: "\\n", with: "\n")
_setupUI()
@@ -103,7 +119,7 @@ class SPPlayBuyView: HWPanModalContentView {
}
override func longFormHeight() -> PanModalHeight {
- return PanModalHeightMake(.content, kSPScreenHeight * (3 / 4))
+ return PanModalHeightMake(.content, kSPScreenHeight - kSPNavBarHeight - 10)
}
override func showDragIndicator() -> Bool {
@@ -115,6 +131,27 @@ class SPPlayBuyView: HWPanModalContentView {
config.backgroundAlpha = 0.6
return config
}
+
+ override func allowsDragToDismiss() -> Bool {
+ return false
+ }
+
+ override func allowsTapBackgroundToDismiss() -> Bool {
+ return false
+ }
+
+ override func allowsPullDownWhenShortState() -> Bool {
+ return false
+ }
+
+ override func minVerticalVelocityToTriggerDismiss() -> CGFloat {
+ return 0
+ }
+
+ override func showsScrollableVerticalScrollIndicator() -> Bool {
+ return false
+ }
+
}
extension SPPlayBuyView {
@@ -137,50 +174,69 @@ extension SPPlayBuyView {
self.handleBuyFinish()
}
}
+
+ @objc private func handleCloseButton() {
+ self.dismiss(animated: true) {
+
+ }
+ }
}
extension SPPlayBuyView {
private func _setupUI() {
addSubview(bgView)
- addSubview(indicatorView)
+ addSubview(closeButton)
addSubview(titleLabel)
- addSubview(restoreButton)
+// addSubview(restoreButton)
addSubview(scrollView)
scrollView.addSubview(stackView)
+ scrollView.addSubview(tipTitleLabel)
+ scrollView.addSubview(tipTextLabel)
bgView.snp.makeConstraints { make in
make.left.right.top.equalToSuperview()
}
- indicatorView.snp.makeConstraints { make in
- make.centerX.equalToSuperview()
- make.top.equalToSuperview().offset(8)
- make.width.equalTo(40)
- make.height.equalTo(5)
+ closeButton.snp.makeConstraints { make in
+ make.top.equalToSuperview().offset(7)
+ make.right.equalToSuperview().offset(-12)
+ make.width.height.equalTo(32)
}
titleLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(16)
- make.top.equalToSuperview().offset(30)
+ make.centerY.equalTo(closeButton)
}
- restoreButton.snp.makeConstraints { make in
- make.centerY.equalTo(titleLabel)
- make.right.equalToSuperview().offset(-16)
- }
+// restoreButton.snp.makeConstraints { make in
+// make.centerY.equalTo(titleLabel)
+// make.right.equalToSuperview().offset(-16)
+// }
scrollView.snp.makeConstraints { make in
- make.top.equalToSuperview().offset(76)
+ make.top.equalToSuperview().offset(58)
make.left.right.equalToSuperview()
make.bottom.equalToSuperview()
}
stackView.snp.makeConstraints { make in
make.left.right.top.equalToSuperview()
- make.bottom.equalTo(-(kSPTabbarSafeBottomMargin + 10))
+// make.bottom.equalTo(-(kSPTabbarSafeBottomMargin + 10))
make.width.equalTo(kSPScreenWidth)
}
+
+ tipTitleLabel.snp.makeConstraints { make in
+ make.left.equalToSuperview().offset(24)
+ make.top.equalTo(stackView.snp.bottom).offset(34)
+ }
+
+ tipTextLabel.snp.makeConstraints { make in
+ make.left.equalTo(tipTitleLabel)
+ make.right.lessThanOrEqualTo(stackView).offset(-24)
+ make.top.equalTo(tipTitleLabel.snp.bottom).offset(4)
+ make.bottom.equalTo(-(kSPTabbarSafeBottomMargin + 10))
+ }
}
@@ -192,15 +248,23 @@ extension SPPlayBuyView {
private func requestPayTemplate() {
SPWalletAPI.requestPayTemplate { [weak self] templateModel in
guard let self = self else { return }
- self.rechargeView.dataArr = templateModel?.list_coins
- self.memberView.setDataArr(dataArr: templateModel?.list_sub_vip)
-
self.stackView.removeAllArrangedSubview()
- self.stackView.addArrangedSubview(self.rechargeView)
- self.stackView.addArrangedSubview(self.memberView)
- self.panModalSetNeedsLayoutUpdate()
+ if let list = templateModel?.list_sub_vip, list.count > 0 {
+ self.memberView.setDataArr(dataArr: templateModel?.list_sub_vip)
+ self.stackView.addArrangedSubview(self.memberView)
+ }
+
+ if let list = templateModel?.list_coins, list.count > 0 {
+ self.rechargeView.dataArr = templateModel?.list_coins
+ self.stackView.addArrangedSubview(self.rechargeView)
+ }
+
+ DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
+ self.panModalSetNeedsLayoutUpdate()
+ }
+
}
}
diff --git a/MoviaBox/Class/Wallet/Controller/SPStoreViewController.swift b/MoviaBox/Class/Wallet/Controller/SPStoreViewController.swift
index 6f85239..aa11404 100644
--- a/MoviaBox/Class/Wallet/Controller/SPStoreViewController.swift
+++ b/MoviaBox/Class/Wallet/Controller/SPStoreViewController.swift
@@ -186,13 +186,17 @@ extension SPStoreViewController {
private func requestPayTemplate() {
SPWalletAPI.requestPayTemplate { [weak self] templateModel in
guard let self = self else { return }
- self.rechargeView.dataArr = templateModel?.list_coins
- self.memberView.setDataArr(dataArr: templateModel?.list_sub_vip)
-
self.stackView.removeAllArrangedSubview()
- self.stackView.addArrangedSubview(self.memberView)
- self.stackView.addArrangedSubview(self.rechargeView)
+ if let list = templateModel?.list_sub_vip, list.count > 0 {
+ self.memberView.setDataArr(dataArr: templateModel?.list_sub_vip)
+ self.stackView.addArrangedSubview(self.memberView)
+ }
+
+ if let list = templateModel?.list_coins, list.count > 0 {
+ self.rechargeView.dataArr = templateModel?.list_coins
+ self.stackView.addArrangedSubview(self.rechargeView)
+ }
}
}
diff --git a/MoviaBox/Class/Wallet/Model/SPPayTemplateItem.swift b/MoviaBox/Class/Wallet/Model/SPPayTemplateItem.swift
index 8f08d73..7e9e8da 100644
--- a/MoviaBox/Class/Wallet/Model/SPPayTemplateItem.swift
+++ b/MoviaBox/Class/Wallet/Model/SPPayTemplateItem.swift
@@ -15,6 +15,11 @@ class SPPayTemplateItem: SPModel, SmartCodable {
case subVip = "sub_vip"
}
+ enum SizeType: String, SmartCaseDefaultable {
+ case small
+ case big
+ }
+
enum VipTypeKey: String, SmartCaseDefaultable {
case week = "week"
case month = "month"
@@ -35,9 +40,24 @@ class SPPayTemplateItem: SPModel, SmartCodable {
case .year:
return "Y_complex".localized
}
-
-
}
+
+ func getTextV2() -> String {
+ switch self {
+ case .week:
+ return "week_short_type".localized
+
+ case .month:
+ return "month_short_type".localized
+
+ case .quarter:
+ return "quarter_short_type".localized
+
+ case .year:
+ return "year_short_type".localized
+ }
+ }
+
}
@@ -55,10 +75,13 @@ class SPPayTemplateItem: SPModel, SmartCodable {
var title: String?
var brief: String?
var sp_description: String?
+ var send_coin_ttl: Int?
var vip_type: String?
var vip_type_key: VipTypeKey?
+ var size: SizeType?
+
var ios_template_id: String?
diff --git a/MoviaBox/Class/Wallet/View/SPCoinRechargeBigCell.swift b/MoviaBox/Class/Wallet/View/SPCoinRechargeBigCell.swift
new file mode 100644
index 0000000..da29d51
--- /dev/null
+++ b/MoviaBox/Class/Wallet/View/SPCoinRechargeBigCell.swift
@@ -0,0 +1,60 @@
+//
+// SPCoinRechargeBigCell.swift
+// MoviaBox
+//
+// Created by 长沙佳儿 on 2025/6/18.
+//
+
+import UIKit
+
+class SPCoinRechargeBigCell: SPCoinRechargeCell {
+
+
+ override var sp_isSelected: Bool {
+ didSet {
+ if sp_isSelected {
+ containerView.image = UIImage(named: "recharge_bg_big_image_01")
+ } else {
+
+ containerView.image = UIImage(named: "recharge_bg_big_image_02")
+ }
+ }
+ }
+
+ override init(frame: CGRect) {
+ super.init(frame: frame)
+ coinIconImageView.image = UIImage(named: "coin_icon_08")
+ ratioBgView.image = UIImage(named: "mark_bg_icon_01")
+ moneyBgView.colors = [UIColor.colorE9BB68().cgColor, UIColor.colorFFE18D().cgColor, UIColor.colorDDA754().cgColor]
+ moneyBgView.layer.cornerRadius = 8
+ moneyLabel.textColor = .color6B3308()
+ coinLabel.font = .fontBold(ofSize: 24)
+ ratioLabel.font = .fontBold(ofSize: 12)
+ ratioLabel.textColor = .color94550E()
+
+ coinBgView.snp.updateConstraints { make in
+ make.top.equalToSuperview().offset(28)
+ }
+
+ bonusLabel.snp.updateConstraints { make in
+ make.top.equalTo(coinBgView.snp.bottom).offset(2)
+ }
+
+ moneyBgView.snp.remakeConstraints { make in
+ make.bottom.equalToSuperview().offset(-5)
+ make.centerX.equalToSuperview()
+ make.left.equalToSuperview().offset(6)
+ make.height.equalTo(30)
+ }
+
+ ratioLabel.snp.updateConstraints { make in
+ make.centerY.equalToSuperview()
+ make.left.equalToSuperview().offset(6)
+ make.right.equalToSuperview().offset(-8)
+ }
+ }
+
+ @MainActor required init?(coder: NSCoder) {
+ fatalError("init(coder:) has not been implemented")
+ }
+}
diff --git a/MoviaBox/Class/Wallet/View/SPCoinRechargeCell.swift b/MoviaBox/Class/Wallet/View/SPCoinRechargeCell.swift
index faccd44..360eb73 100644
--- a/MoviaBox/Class/Wallet/View/SPCoinRechargeCell.swift
+++ b/MoviaBox/Class/Wallet/View/SPCoinRechargeCell.swift
@@ -9,28 +9,31 @@ import UIKit
class SPCoinRechargeCell: SPCollectionViewCell {
- var sp_isSelected = false {
- didSet {
- if sp_isSelected {
- containerView.image = UIImage(named: "recharge_bg_image_01")
- moneyLabel.backgroundColor = .colorFFF0DE(alpha: 0.1)
- } else {
-
- containerView.image = UIImage(named: "recharge_bg_image_02")
- moneyLabel.backgroundColor = .color000000(alpha: 0.8)
- }
- }
- }
+ var sp_isSelected = false
var model: SPPayTemplateItem? {
didSet {
coinLabel.text = "\(model?.coins ?? 0)"
- if let sendCoins = model?.send_coins, sendCoins > 0 {
+ if let mark = model?.corner_marker, !mark.isEmpty {
+ hotView.isHidden = false
+ } else {
+ hotView.isHidden = true
+ }
+
+ if let sendCoins = model?.send_coins, sendCoins > 0, let coins = model?.coins {
bonusLabel.isHidden = false
- bonusLabel.text = String(format: "movia_bonus_#".localized, "+\(sendCoins)")
+ ratioBgView.isHidden = false
+
+ let ratio = String(format: "%.0f", CGFloat(sendCoins) / CGFloat(coins) * 100)
+
+ ratioLabel.text = "+\(ratio)%"
+
+ bonusLabel.text = "+\(sendCoins)"
+// bonusLabel.text = String(format: "movia_bonus_#".localized, "+\(sendCoins)")
} else {
bonusLabel.isHidden = true
+ ratioBgView.isHidden = true
}
moneyLabel.text = "\(model?.currency ?? "")\(model?.price ?? "0")"
@@ -38,47 +41,68 @@ class SPCoinRechargeCell: SPCollectionViewCell {
}
//MARK: UI属性
- private lazy var containerView: UIImageView = {
+ private(set) lazy var containerView: UIImageView = {
let imageView = UIImageView()
return imageView
}()
- private lazy var coinBgView: UIView = {
+ private(set) lazy var coinBgView: UIView = {
let view = UIView()
return view
}()
- private lazy var coinIconImageView: UIImageView = {
- let imageView = UIImageView(image: UIImage(named: "coin_icon_04"))
+ private(set) lazy var coinIconImageView: UIImageView = {
+ let imageView = UIImageView()
return imageView
}()
- private lazy var coinLabel: UILabel = {
+ private(set) lazy var coinLabel: UILabel = {
let label = UILabel()
- label.font = .fontBold(ofSize: 20)
label.textColor = .colorFFFFFF()
return label
}()
- private lazy var bonusLabel: UILabel = {
+ private(set) lazy var bonusLabel: UILabel = {
let label = UILabel()
label.font = .fontMedium(ofSize: 14)
label.textColor = .colorEF7301()
return label
}()
- private lazy var moneyLabel: UILabel = {
+ private(set) lazy var moneyBgView: SPGradientView = {
+ let view = SPGradientView()
+ view.locations = [0, 0.5, 1]
+ view.startPoint = .init(x: 0, y: 0.5)
+ view.endPoint = .init(x: 1, y: 0.5)
+ view.layer.masksToBounds = true
+ return view
+ }()
+
+ private(set) lazy var moneyLabel: UILabel = {
let label = UILabel()
- label.layer.cornerRadius = 10
- label.layer.masksToBounds = true
- label.textAlignment = .center
label.font = .fontMedium(ofSize: 14)
- label.textColor = .colorFFCF93()
return label
}()
+ private(set) lazy var ratioBgView: UIImageView = {
+ let view = UIImageView()
+ return view
+ }()
+
+ private(set) lazy var ratioLabel: UILabel = {
+ let label = UILabel()
+ return label
+ }()
+
+ private lazy var hotView: UIImageView = {
+ let view = UIImageView(image: UIImage(named: "hot_icon_03"))
+ return view
+ }()
+
override init(frame: CGRect) {
super.init(frame: frame)
+ contentView.layer.masksToBounds = false
+ self.layer.masksToBounds = false
_setupUI()
}
@@ -92,16 +116,25 @@ extension SPCoinRechargeCell {
private func _setupUI() {
contentView.addSubview(containerView)
+ contentView.addSubview(hotView)
containerView.addSubview(coinBgView)
coinBgView.addSubview(coinIconImageView)
coinBgView.addSubview(coinLabel)
containerView.addSubview(bonusLabel)
- containerView.addSubview(moneyLabel)
+ containerView.addSubview(moneyBgView)
+ moneyBgView.addSubview(moneyLabel)
+ containerView.addSubview(ratioBgView)
+ ratioBgView.addSubview(ratioLabel)
containerView.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
+ hotView.snp.makeConstraints { make in
+ make.left.equalToSuperview().offset(4)
+ make.top.equalToSuperview().offset(-2)
+ }
+
coinBgView.snp.makeConstraints { make in
make.centerX.equalToSuperview()
make.top.equalToSuperview().offset(24)
@@ -125,11 +158,20 @@ extension SPCoinRechargeCell {
}
moneyLabel.snp.makeConstraints { make in
- make.left.equalToSuperview().offset(2)
- make.centerX.equalToSuperview()
- make.bottom.equalToSuperview().offset(-2)
- make.height.equalTo(30)
+ make.center.equalToSuperview()
}
+
+ ratioBgView.snp.makeConstraints { make in
+ make.top.right.equalToSuperview()
+ }
+
+ ratioLabel.snp.makeConstraints { make in
+ make.centerY.equalToSuperview()
+ make.left.equalToSuperview().offset(5)
+ make.right.equalToSuperview().offset(-5)
+ }
+
+
}
}
diff --git a/MoviaBox/Class/Wallet/View/SPCoinRechargeSmallCell.swift b/MoviaBox/Class/Wallet/View/SPCoinRechargeSmallCell.swift
new file mode 100644
index 0000000..de5e772
--- /dev/null
+++ b/MoviaBox/Class/Wallet/View/SPCoinRechargeSmallCell.swift
@@ -0,0 +1,50 @@
+//
+// SPCoinRechargeSmallCell.swift
+// MoviaBox
+//
+// Created by 长沙佳儿 on 2025/6/18.
+//
+
+import UIKit
+
+class SPCoinRechargeSmallCell: SPCoinRechargeCell {
+
+ override var sp_isSelected: Bool {
+ didSet {
+ if sp_isSelected {
+ containerView.image = UIImage(named: "recharge_bg_image_01")
+ } else {
+
+ containerView.image = UIImage(named: "recharge_bg_image_02")
+ }
+ }
+ }
+
+ override init(frame: CGRect) {
+ super.init(frame: frame)
+ coinIconImageView.image = UIImage(named: "coin_icon_07")
+ ratioBgView.image = UIImage(named: "mark_bg_icon_02")
+ moneyBgView.colors = [UIColor.color000000(alpha: 0.8).cgColor, UIColor.color000000(alpha: 0.8).cgColor, UIColor.color000000(alpha: 0.8).cgColor]
+ moneyBgView.layer.cornerRadius = 10
+ moneyLabel.textColor = .colorFFCF93()
+ coinLabel.font = .fontBold(ofSize: 20)
+ ratioLabel.font = .fontRegular(ofSize: 11)
+ ratioLabel.textColor = .colorFFCF93()
+
+
+ coinBgView.snp.updateConstraints { make in
+ make.top.equalToSuperview().offset(34)
+ }
+
+ moneyBgView.snp.remakeConstraints { make in
+ make.bottom.equalToSuperview().offset(-2)
+ make.centerX.equalToSuperview()
+ make.left.equalToSuperview().offset(2)
+ make.height.equalTo(30)
+ }
+ }
+
+ @MainActor required init?(coder: NSCoder) {
+ fatalError("init(coder:) has not been implemented")
+ }
+}
diff --git a/MoviaBox/Class/Wallet/View/SPCoinRechargeView.swift b/MoviaBox/Class/Wallet/View/SPCoinRechargeView.swift
index 909d27c..276d001 100644
--- a/MoviaBox/Class/Wallet/View/SPCoinRechargeView.swift
+++ b/MoviaBox/Class/Wallet/View/SPCoinRechargeView.swift
@@ -10,20 +10,49 @@ import UIKit
class SPCoinRechargeView: UIView {
override var intrinsicContentSize: CGSize {
- return CGSize(width: kSPScreenWidth, height: 20 + 14 + 125)
+ return CGSize(width: kSPScreenWidth, height: 34 + self.collectionView.contentSize.height + 1)
}
- private lazy var currentIndexPath: IndexPath = .init(row: 0, section: 0)
+
+ private var currentModel: SPPayTemplateItem?
///充值成功回调
var rechargeFinishHandle: (() -> Void)?
var dataArr: [SPPayTemplateItem]? {
didSet {
- self.collectionView.reloadData()
+ listDataArr.removeAll()
+
+ var bigArr: [SPPayTemplateItem] = []
+ var smallArr: [SPPayTemplateItem] = []
+
+ dataArr?.forEach({
+ if $0.size == .big {
+ bigArr.append($0)
+ } else {
+ smallArr.append($0)
+ }
+ })
+
+ if bigArr.count > 0 {
+ listDataArr.append(bigArr)
+ }
+ if smallArr.count > 0 {
+ listDataArr.append(smallArr)
+ }
+
+ UIView.performWithoutAnimation { [weak self] in
+ self?.collectionView.reloadData()
+ }
+
+ self.collectionView.performBatchUpdates(nil) { [weak self] _ in
+ self?.invalidateIntrinsicContentSize()
+ }
}
}
+ private lazy var listDataArr: [[SPPayTemplateItem]] = []
+
var userInfo: SPUserInfo? {
didSet {
coinLabel.text = "\((userInfo?.coin_left_total ?? 0) + (userInfo?.send_coin_left_total ?? 0))"
@@ -54,13 +83,9 @@ class SPCoinRechargeView: UIView {
return label
}()
- private lazy var collectionViewLayout: UICollectionViewFlowLayout = {
- let layout = UICollectionViewFlowLayout()
- layout.scrollDirection = .horizontal
- layout.minimumLineSpacing = 8
- layout.minimumInteritemSpacing = 8
- layout.sectionInset = .init(top: 0, left: 16, bottom: 0, right: 16)
- layout.itemSize = CGSize(width: 120, height: 125)
+ private lazy var collectionViewLayout: WaterfallMutiSectionFlowLayout = {
+ let layout = WaterfallMutiSectionFlowLayout()
+ layout.delegate = self
return layout
}()
@@ -70,7 +95,9 @@ class SPCoinRechargeView: UIView {
collectionView.dataSource = self
collectionView.showsVerticalScrollIndicator = false
collectionView.showsHorizontalScrollIndicator = false
- SPCoinRechargeCell.registerCell(collectionView: collectionView)
+ collectionView.layer.masksToBounds = false
+ SPCoinRechargeBigCell.registerCell(collectionView: collectionView, SPPayTemplateItem.SizeType.big.rawValue)
+ SPCoinRechargeSmallCell.registerCell(collectionView: collectionView, SPPayTemplateItem.SizeType.small.rawValue)
return collectionView
}()
@@ -113,7 +140,7 @@ extension SPCoinRechargeView {
collectionView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview()
- make.height.equalTo(125)
+ make.top.equalToSuperview().offset(34)
}
}
@@ -123,21 +150,28 @@ extension SPCoinRechargeView {
//MARK: -------------- UICollectionViewDelegate & UICollectionViewDataSource --------------
extension SPCoinRechargeView: UICollectionViewDelegate, UICollectionViewDataSource {
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
- let cell = SPCoinRechargeCell.dequeueReusableCell(collectionView: collectionView, indexPath: indexPath)
- cell.sp_isSelected = indexPath == currentIndexPath
- cell.model = dataArr?[indexPath.row]
+ let model = self.listDataArr[indexPath.section][indexPath.row]
+ let size = model.size ?? .small
+
+ let cell = SPCoinRechargeCell.dequeueReusableCell(collectionView: collectionView, indexPath: indexPath, size.rawValue)
+ cell.sp_isSelected = model == currentModel
+ cell.model = model
return cell
}
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
- return dataArr?.count ?? 0
+ return self.listDataArr[section].count
+ }
+
+ func numberOfSections(in collectionView: UICollectionView) -> Int {
+ return self.listDataArr.count
}
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
- currentIndexPath = indexPath
- collectionView.reloadData()
+ let model = self.listDataArr[indexPath.section][indexPath.row]
- guard let model = self.dataArr?[indexPath.row] else { return }
+ currentModel = model
+ collectionView.reloadData()
SPIAPManager.manager.startRecharge(model: model, shortPlayId: shortPlayId, videoId: videoId) { [weak self] finish in
if finish {
@@ -147,3 +181,48 @@ extension SPCoinRechargeView: UICollectionViewDelegate, UICollectionViewDataSour
}
}
+
+//MARK: -------------- WaterfallMutiSectionDelegate --------------
+extension SPCoinRechargeView: WaterfallMutiSectionDelegate {
+
+ func columnNumber(collectionView collection: UICollectionView, layout: WaterfallMutiSectionFlowLayout, section: Int) -> Int {
+ let model = self.listDataArr[section].last
+ if model?.size == .big {
+ return 2
+ } else {
+ return 3
+ }
+ }
+
+ func heightForRowAtIndexPath(collectionView collection: UICollectionView, layout: WaterfallMutiSectionFlowLayout, indexPath: IndexPath, itemWidth: CGFloat) -> CGFloat {
+ let model = self.listDataArr[indexPath.section][indexPath.row]
+ if model.size == .big {
+ return 114
+ } else {
+ return 126
+ }
+ }
+
+ func insetForSection(collectionView collection: UICollectionView, layout: WaterfallMutiSectionFlowLayout, section: Int) -> UIEdgeInsets {
+ return .init(top: 0, left: 15, bottom: 0, right: 15)
+ }
+
+ func lineSpacing(collectionView collection: UICollectionView, layout: WaterfallMutiSectionFlowLayout, section: Int) -> CGFloat {
+ return 15
+ }
+
+ func interitemSpacing(collectionView collection: UICollectionView, layout: WaterfallMutiSectionFlowLayout, section: Int) -> CGFloat {
+ return 15
+ }
+
+ func referenceSizeForHeader(collectionView collection: UICollectionView, layout: WaterfallMutiSectionFlowLayout, section: Int) -> CGSize {
+ if section == 0 {
+ return .init(width: kSPScreenWidth, height: 0)
+ } else {
+ return .init(width: kSPScreenWidth, height: 15)
+ }
+ }
+
+
+
+}
diff --git a/MoviaBox/Class/Wallet/View/SPMemberRechargeCell.swift b/MoviaBox/Class/Wallet/View/SPMemberRechargeCell.swift
index a03b918..a5f1648 100644
--- a/MoviaBox/Class/Wallet/View/SPMemberRechargeCell.swift
+++ b/MoviaBox/Class/Wallet/View/SPMemberRechargeCell.swift
@@ -14,87 +14,87 @@ class SPMemberRechargeCell: SPCollectionViewCell {
didSet {
desLabel.text = model?.sp_description
// typeLabel.text = model?.vip_type_key?.getText()
- typeLabel.text = model?.brief
- currencyLabel.text = model?.currency
- moneyLabel.text = model?.price
+ typeLabel.text = model?.vip_type_key?.getTextV2()
+ durationLabel.text = "/\(model?.vip_type_key?.getText() ?? "")"
+
+ moneyLabel.text = "\(model?.currency ?? "")\(model?.price ?? "")"
+
if let sendCoins = model?.send_coins, sendCoins > 0 {
markBgView.isHidden = false
+ tipLabel.isHidden = false
sendCoinLabel.text = String(format: "movia_extra_#".localized, "\(sendCoins)")
+
+ tipLabel.text = "·" + "movia_coins_extra_days".localizedReplace(text: "\(model?.send_coin_ttl ?? 0)")
+
} else {
markBgView.isHidden = true
+ tipLabel.isHidden = true
}
switch model?.vip_type_key {
case .year:
+ bgView.image = UIImage(named: "vip_bg_image_01")
vipImageView.image = UIImage(named: "vip_image_01")
- downBgView.colors = [UIColor.colorFDE9A6().cgColor, UIColor.colorFFAC38().cgColor]
- topBgView.colors = [UIColor.color2B2826().cgColor, UIColor.color100F0B().cgColor]
- desLabel.textColor = .color6B3308()
- iconImageView.image = UIImage(named: "vip_icon_03")
- typeLabel.textColor = .colorFFB559()
+ iconImageView.image = UIImage(named: "vip_icon_10")
typeIconImageView.image = UIImage(named: "vip_icon_05")
- case .quarter:
- vipImageView.image = UIImage(named: "vip_image_02")
- downBgView.colors = [UIColor.colorFDE9A6().cgColor, UIColor.colorFFAC38().cgColor]
- topBgView.colors = [UIColor.colorFEE3B5().cgColor, UIColor.colorFCCE7D().cgColor]
-
desLabel.textColor = .color6B3308()
+ typeLabel.textColor = .colorFED095()
+ moneyLabel.textColor = .colorFFE49E()
+ tipLabel.textColor = .colorFFFFFF(alpha: 0.8)
+
+ case .quarter:
+ bgView.image = UIImage(named: "vip_bg_image_02")
+ vipImageView.image = UIImage(named: "vip_image_02")
+
iconImageView.image = UIImage(named: "vip_icon_03")
- typeLabel.textColor = .color9F5300()
typeIconImageView.image = UIImage(named: "vip_icon_06")
- case .month:
- vipImageView.image = UIImage(named: "vip_image_03")
- downBgView.colors = [UIColor.color2AAED3().cgColor, UIColor.color9CD5E5().cgColor]
- topBgView.colors = [UIColor.colorF2F4F4().cgColor, UIColor.colorC8E1E8().cgColor]
+ desLabel.textColor = .color6B3308()
+ typeLabel.textColor = .color9F5300()
+ moneyLabel.textColor = typeLabel.textColor
+ tipLabel.textColor = typeLabel.textColor
+
+ case .month:
+ bgView.image = UIImage(named: "vip_bg_image_03")
+ vipImageView.image = UIImage(named: "vip_image_03")
- desLabel.textColor = .colorFFFFFF()
iconImageView.image = UIImage(named: "vip_icon_04")
- typeLabel.textColor = .color0D4E64()
typeIconImageView.image = UIImage(named: "vip_icon_07")
+ desLabel.textColor = .colorFFFFFF()
+ typeLabel.textColor = .color0D4E64()
+ moneyLabel.textColor = typeLabel.textColor
+ tipLabel.textColor = typeLabel.textColor
+
case .week:
+ bgView.image = UIImage(named: "vip_bg_image_04")
vipImageView.image = UIImage(named: "vip_image_04")
- downBgView.colors = [UIColor.color0588DB().cgColor, UIColor.colorA9E1F2().cgColor]
- topBgView.colors = [UIColor.colorFAFCFE().cgColor, UIColor.colorCED6FA().cgColor]
+
+ iconImageView.image = UIImage(named: "vip_icon_04")
+ typeIconImageView.image = UIImage(named: "vip_icon_08")
desLabel.textColor = .colorFFFFFF()
- iconImageView.image = UIImage(named: "vip_icon_04")
- typeLabel.textColor = .color020926()
- typeIconImageView.image = UIImage(named: "vip_icon_08")
+ typeLabel.textColor = .color005786()
+ moneyLabel.textColor = typeLabel.textColor
+ tipLabel.textColor = .color020926()
default:
break
}
+ typeVipLabel.textColor = typeLabel.textColor
+ durationLabel.textColor = moneyLabel.textColor
- currencyLabel.textColor = typeLabel.textColor
- moneyLabel.textColor = typeLabel.textColor
- tipLabel.textColor = typeLabel.textColor
+ updateLayout()
}
}
//MARK: UI属性
- private lazy var downBgView: SPGradientView = {
- let view = SPGradientView()
- view.locations = [0, 1]
- view.startPoint = .init(x: 0, y: 0.5)
- view.endPoint = .init(x: 1, y: 0.5)
- view.layer.cornerRadius = 12
- view.layer.masksToBounds = true
- return view
- }()
-
- private lazy var topBgView: SPGradientView = {
- let view = SPGradientView()
- view.locations = [0, 1]
- view.startPoint = .init(x: 0, y: 0.5)
- view.endPoint = .init(x: 1, y: 0.5)
- view.layer.cornerRadius = 11
- view.layer.masksToBounds = true
- return view
+ private lazy var bgView: UIImageView = {
+ let imageView = UIImageView()
+ return imageView
}()
private lazy var vipImageView: UIImageView = {
@@ -119,27 +119,35 @@ class SPMemberRechargeCell: SPCollectionViewCell {
return label
}()
+ private lazy var typeVipLabel: UILabel = {
+ let string = NSMutableAttributedString(string: "VIP")
+ string.font = .fontBold(ofSize: 13).withBoldItalic()
+
+ let label = UILabel()
+ label.attributedText = string
+ return label
+ }()
+
private lazy var typeIconImageView: UIImageView = {
let imageView = UIImageView()
imageView.isHidden = true
return imageView
}()
- private lazy var currencyLabel: UILabel = {
- let label = UILabel()
- label.font = .fontBold(ofSize: 32)
- return label
- }()
-
private lazy var moneyLabel: UILabel = {
let label = UILabel()
label.font = .fontBold(ofSize: 32)
return label
}()
+ private lazy var durationLabel: UILabel = {
+ let label = UILabel()
+ return label
+ }()
+
private lazy var tipLabel: UILabel = {
let label = UILabel()
- label.font = .fontRegular(ofSize: 11)
+ label.font = .fontRegular(ofSize: 10)
label.text = "movia_buy_menber_tip".localized
return label
}()
@@ -150,7 +158,7 @@ class SPMemberRechargeCell: SPCollectionViewCell {
view.locations = [0, 0.5, 1]
view.startPoint = .init(x: 0, y: 0.5)
view.endPoint = .init(x: 1, y: 0.5)
- view.addRadius(topLeft: 0, topRight: 0, bottomLeft: 11, bottomRight: 0)
+ view.addRadius(topLeft: 0, topRight: 8, bottomLeft: 11, bottomRight: 0)
return view
}()
@@ -176,32 +184,82 @@ class SPMemberRechargeCell: SPCollectionViewCell {
fatalError("init(coder:) has not been implemented")
}
+ private func updateLayout() {
+ if model?.vip_type_key == .year {
+ desLabel.font = .fontRegular(ofSize: 12)
+ typeLabel.font = .fontMedium(ofSize: 16)
+ durationLabel.font = .fontRegular(ofSize: 14)
+
+ vipImageView.snp.updateConstraints { make in
+ make.right.equalToSuperview().offset(0)
+ }
+
+ typeLabel.snp.updateConstraints { make in
+ make.top.equalToSuperview().offset(12)
+ }
+
+ moneyLabel.snp.updateConstraints { make in
+ make.top.equalToSuperview().offset(39)
+ }
+
+ tipLabel.snp.updateConstraints { make in
+ make.top.equalTo(moneyLabel.snp.bottom).offset(6)
+ }
+
+ } else {
+ desLabel.font = .fontRegular(ofSize: 10)
+ typeLabel.font = .fontMedium(ofSize: 12)
+ durationLabel.font = .fontRegular(ofSize: 12)
+
+ vipImageView.snp.updateConstraints { make in
+ make.right.equalToSuperview().offset(-11)
+ }
+
+ typeLabel.snp.updateConstraints { make in
+ make.top.equalToSuperview().offset(8)
+ }
+
+ moneyLabel.snp.updateConstraints { make in
+ make.top.equalToSuperview().offset(26)
+ }
+
+ tipLabel.snp.updateConstraints { make in
+ make.top.equalTo(moneyLabel.snp.bottom).offset(0)
+ }
+ }
+ }
+
}
extension SPMemberRechargeCell {
private func _setupUI() {
- contentView.addSubview(downBgView)
- downBgView.addSubview(iconImageView)
- downBgView.addSubview(desLabel)
- contentView.addSubview(topBgView)
- topBgView.addSubview(vipImageView)
- topBgView.addSubview(typeLabel)
- topBgView.addSubview(typeIconImageView)
- topBgView.addSubview(currencyLabel)
- topBgView.addSubview(moneyLabel)
- topBgView.addSubview(tipLabel)
- topBgView.addSubview(markBgView)
+ contentView.addSubview(bgView)
+ bgView.addSubview(iconImageView)
+ bgView.addSubview(desLabel)
+ bgView.addSubview(vipImageView)
+ bgView.addSubview(typeLabel)
+ bgView.addSubview(typeVipLabel)
+ bgView.addSubview(typeIconImageView)
+ bgView.addSubview(moneyLabel)
+ bgView.addSubview(durationLabel)
+ bgView.addSubview(tipLabel)
+ bgView.addSubview(markBgView)
markBgView.addSubview(sendCoinLabel)
markBgView.addSubview(coinImageView)
- downBgView.snp.makeConstraints { make in
+ bgView.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
+ vipImageView.snp.makeConstraints { make in
+ make.top.equalToSuperview().offset(15)
+ make.right.equalToSuperview().offset(-11)
+ }
+
iconImageView.snp.makeConstraints { make in
- make.left.equalToSuperview().offset(17)
+ make.left.equalToSuperview().offset(16)
make.bottom.equalToSuperview().offset(-7)
}
@@ -210,21 +268,15 @@ extension SPMemberRechargeCell {
make.left.equalTo(iconImageView.snp.right).offset(4)
}
- topBgView.snp.makeConstraints { make in
- make.left.equalToSuperview().offset(1)
- make.right.equalToSuperview().offset(-1)
- make.top.equalToSuperview().offset(1)
- make.bottom.equalToSuperview().offset(-25)
- }
-
- vipImageView.snp.makeConstraints { make in
- make.centerY.equalToSuperview()
- make.right.equalToSuperview().offset(-7)
- }
typeLabel.snp.makeConstraints { make in
- make.left.equalToSuperview().offset(kSPMainW(23))
- make.top.equalToSuperview().offset(19)
+ make.left.equalToSuperview().offset(16)
+ make.top.equalToSuperview().offset(8)
+ }
+
+ typeVipLabel.snp.makeConstraints { make in
+ make.centerY.equalTo(typeLabel)
+ make.left.equalTo(typeLabel.snp.right).offset(2)
}
typeIconImageView.snp.makeConstraints { make in
@@ -232,23 +284,24 @@ extension SPMemberRechargeCell {
make.left.equalTo(typeLabel.snp.right).offset(3)
}
- currencyLabel.snp.makeConstraints { make in
+ moneyLabel.snp.makeConstraints { make in
make.left.equalTo(typeLabel)
- make.top.equalTo(typeLabel.snp.bottom).offset(8)
+ make.top.equalToSuperview().offset(28)
}
- moneyLabel.snp.makeConstraints { make in
- make.centerY.equalTo(currencyLabel)
- make.left.equalTo(currencyLabel.snp.right).offset(5)
+ durationLabel.snp.makeConstraints { make in
+ make.left.equalTo(moneyLabel.snp.right)
+ make.centerY.equalTo(moneyLabel)
}
tipLabel.snp.makeConstraints { make in
make.left.equalTo(typeLabel)
- make.top.equalTo(moneyLabel.snp.bottom).offset(8)
+ make.top.equalTo(moneyLabel.snp.bottom).offset(4)
}
markBgView.snp.makeConstraints { make in
- make.top.right.equalToSuperview()
+ make.top.equalToSuperview().offset(1)
+ make.right.equalToSuperview().offset(-1)
make.height.equalTo(18)
}
diff --git a/MoviaBox/Class/Wallet/View/SPMemberRechargeView.swift b/MoviaBox/Class/Wallet/View/SPMemberRechargeView.swift
index f535944..7917e73 100644
--- a/MoviaBox/Class/Wallet/View/SPMemberRechargeView.swift
+++ b/MoviaBox/Class/Wallet/View/SPMemberRechargeView.swift
@@ -10,10 +10,8 @@ import UIKit
class SPMemberRechargeView: UIView {
override var intrinsicContentSize: CGSize {
- let count = CGFloat(dataArr?.count ?? 0)
-
- let height = 32 + count * collectionViewLayout.itemSize.height + (count - 1) * collectionViewLayout.minimumInteritemSpacing
- return CGSize(width: kSPScreenWidth, height: height)
+ let height = 30 + self.collectionView.contentSize.height
+ return CGSize(width: kSPScreenWidth, height: height + 1)
}
///会员购买成功
@@ -25,18 +23,26 @@ class SPMemberRechargeView: UIView {
var videoId: String?
//MARK: UI属性
+ private lazy var titleBgView: UIView = {
+ let view = UIView()
+ view.backgroundColor = .colorFFFFFF(alpha: 0.1)
+ view.layer.cornerRadius = 11.5
+ view.layer.masksToBounds = true
+ return view
+ }()
+
private lazy var titleLabel: UILabel = {
let label = UILabel()
- label.font = .fontRegular(ofSize: 14)
- label.textColor = .colorFFFFFF(alpha: 0.7)
- label.text = "movia_membership".localized
+ label.font = .fontRegular(ofSize: 10)
+ label.textColor = .colorFFFFFF()
+ label.text = "movia_member_tip_text".localized
return label
}()
- private lazy var collectionViewLayout: UICollectionViewFlowLayout = {
- let layout = UICollectionViewFlowLayout()
+ private lazy var collectionViewLayout: WaterfallMutiSectionFlowLayout = {
+ let layout = WaterfallMutiSectionFlowLayout()
+ layout.delegate = self
layout.sectionInset = .init(top: 0, left: 16, bottom: 0, right: 16)
- layout.itemSize = CGSize(width: kSPScreenWidth - 32, height: 152)
layout.minimumInteritemSpacing = 10
layout.minimumLineSpacing = 10
return layout
@@ -65,13 +71,13 @@ class SPMemberRechargeView: UIView {
func setDataArr(dataArr: [SPPayTemplateItem]?) {
self.dataArr = dataArr
-// dataArr?.forEach({
-// if $0.vip_type_key == .quarter {
-// self.dataArr?.append($0)
-// }
-// })
- self.collectionView.reloadData()
- self.invalidateIntrinsicContentSize()
+ UIView.performWithoutAnimation { [weak self] in
+ self?.collectionView.reloadData()
+ }
+
+ self.collectionView.performBatchUpdates(nil) { [weak self] _ in
+ self?.invalidateIntrinsicContentSize()
+ }
}
}
@@ -79,18 +85,26 @@ class SPMemberRechargeView: UIView {
extension SPMemberRechargeView {
private func _setupUI() {
- addSubview(titleLabel)
+ addSubview(titleBgView)
+ titleBgView.addSubview(titleLabel)
addSubview(collectionView)
- titleLabel.snp.makeConstraints { make in
- make.left.equalToSuperview().offset(16)
- make.height.equalTo(20)
+ titleBgView.snp.makeConstraints { make in
+ make.left.equalToSuperview().offset(15)
+ make.centerX.equalToSuperview()
make.top.equalToSuperview()
+ make.height.equalTo(23)
+ }
+
+ titleLabel.snp.makeConstraints { make in
+ make.left.equalToSuperview().offset(17)
+ make.centerY.equalToSuperview()
+ make.right.lessThanOrEqualToSuperview().offset(-17)
}
collectionView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview()
- make.top.equalToSuperview().offset(32)
+ make.top.equalToSuperview().offset(30)
}
}
@@ -119,3 +133,30 @@ extension SPMemberRechargeView: UICollectionViewDelegate, UICollectionViewDataSo
}
}
+
+//MARK: -------------- WaterfallMutiSectionDelegate --------------
+extension SPMemberRechargeView: WaterfallMutiSectionDelegate {
+
+ func columnNumber(collectionView collection: UICollectionView, layout: WaterfallMutiSectionFlowLayout, section: Int) -> Int {
+ return 1
+ }
+
+ func heightForRowAtIndexPath(collectionView collection: UICollectionView, layout: WaterfallMutiSectionFlowLayout, indexPath: IndexPath, itemWidth: CGFloat) -> CGFloat {
+ let model = dataArr?[indexPath.row]
+ if model?.vip_type_key == .year {
+ return 129
+ } else {
+ return 102
+ }
+ }
+
+ func lineSpacing(collectionView collection: UICollectionView, layout: WaterfallMutiSectionFlowLayout, section: Int) -> CGFloat {
+ return 9
+ }
+
+ func insetForSection(collectionView collection: UICollectionView, layout: WaterfallMutiSectionFlowLayout, section: Int) -> UIEdgeInsets {
+ return .init(top: 0, left: 15, bottom: 0, right: 15)
+ }
+
+
+}
diff --git a/MoviaBox/Source/Assets.xcassets/icon/coin_icon_02.imageset/Contents.json b/MoviaBox/Source/Assets.xcassets/icon/close_icon_04.imageset/Contents.json
similarity index 74%
rename from MoviaBox/Source/Assets.xcassets/icon/coin_icon_02.imageset/Contents.json
rename to MoviaBox/Source/Assets.xcassets/icon/close_icon_04.imageset/Contents.json
index 2f77ae3..9fd0a3b 100644
--- a/MoviaBox/Source/Assets.xcassets/icon/coin_icon_02.imageset/Contents.json
+++ b/MoviaBox/Source/Assets.xcassets/icon/close_icon_04.imageset/Contents.json
@@ -5,12 +5,12 @@
"scale" : "1x"
},
{
- "filename" : "Frame 1912056652@2x.png",
+ "filename" : "Frame 1912057056@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
- "filename" : "Frame 1912056652@3x.png",
+ "filename" : "Frame 1912057056@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
diff --git a/MoviaBox/Source/Assets.xcassets/icon/close_icon_04.imageset/Frame 1912057056@2x.png b/MoviaBox/Source/Assets.xcassets/icon/close_icon_04.imageset/Frame 1912057056@2x.png
new file mode 100644
index 0000000..0ed1c3a
Binary files /dev/null and b/MoviaBox/Source/Assets.xcassets/icon/close_icon_04.imageset/Frame 1912057056@2x.png differ
diff --git a/MoviaBox/Source/Assets.xcassets/icon/close_icon_04.imageset/Frame 1912057056@3x.png b/MoviaBox/Source/Assets.xcassets/icon/close_icon_04.imageset/Frame 1912057056@3x.png
new file mode 100644
index 0000000..85f6a74
Binary files /dev/null and b/MoviaBox/Source/Assets.xcassets/icon/close_icon_04.imageset/Frame 1912057056@3x.png differ
diff --git a/MoviaBox/Source/Assets.xcassets/icon/coin_icon_01.imageset/Contents.json b/MoviaBox/Source/Assets.xcassets/icon/coin_icon_01.imageset/Contents.json
index f910615..2d19a19 100644
--- a/MoviaBox/Source/Assets.xcassets/icon/coin_icon_01.imageset/Contents.json
+++ b/MoviaBox/Source/Assets.xcassets/icon/coin_icon_01.imageset/Contents.json
@@ -5,12 +5,12 @@
"scale" : "1x"
},
{
- "filename" : "Frame 1912056653@2x.png",
+ "filename" : "image 21@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
- "filename" : "Frame 1912056653@3x.png",
+ "filename" : "image 21@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
diff --git a/MoviaBox/Source/Assets.xcassets/icon/coin_icon_01.imageset/Frame 1912056653@2x.png b/MoviaBox/Source/Assets.xcassets/icon/coin_icon_01.imageset/Frame 1912056653@2x.png
deleted file mode 100644
index 2fdfb94..0000000
Binary files a/MoviaBox/Source/Assets.xcassets/icon/coin_icon_01.imageset/Frame 1912056653@2x.png and /dev/null differ
diff --git a/MoviaBox/Source/Assets.xcassets/icon/coin_icon_01.imageset/Frame 1912056653@3x.png b/MoviaBox/Source/Assets.xcassets/icon/coin_icon_01.imageset/Frame 1912056653@3x.png
deleted file mode 100644
index adb663a..0000000
Binary files a/MoviaBox/Source/Assets.xcassets/icon/coin_icon_01.imageset/Frame 1912056653@3x.png and /dev/null differ
diff --git a/MoviaBox/Source/Assets.xcassets/icon/coin_icon_01.imageset/image 21@2x.png b/MoviaBox/Source/Assets.xcassets/icon/coin_icon_01.imageset/image 21@2x.png
new file mode 100644
index 0000000..b7c1b67
Binary files /dev/null and b/MoviaBox/Source/Assets.xcassets/icon/coin_icon_01.imageset/image 21@2x.png differ
diff --git a/MoviaBox/Source/Assets.xcassets/icon/coin_icon_01.imageset/image 21@3x.png b/MoviaBox/Source/Assets.xcassets/icon/coin_icon_01.imageset/image 21@3x.png
new file mode 100644
index 0000000..c173480
Binary files /dev/null and b/MoviaBox/Source/Assets.xcassets/icon/coin_icon_01.imageset/image 21@3x.png differ
diff --git a/MoviaBox/Source/Assets.xcassets/icon/coin_icon_02.imageset/Frame 1912056652@2x.png b/MoviaBox/Source/Assets.xcassets/icon/coin_icon_02.imageset/Frame 1912056652@2x.png
deleted file mode 100644
index b49bf5e..0000000
Binary files a/MoviaBox/Source/Assets.xcassets/icon/coin_icon_02.imageset/Frame 1912056652@2x.png and /dev/null differ
diff --git a/MoviaBox/Source/Assets.xcassets/icon/coin_icon_02.imageset/Frame 1912056652@3x.png b/MoviaBox/Source/Assets.xcassets/icon/coin_icon_02.imageset/Frame 1912056652@3x.png
deleted file mode 100644
index 046d0bb..0000000
Binary files a/MoviaBox/Source/Assets.xcassets/icon/coin_icon_02.imageset/Frame 1912056652@3x.png and /dev/null differ
diff --git a/MoviaBox/Source/Assets.xcassets/icon/coin_icon_07.imageset/Contents.json b/MoviaBox/Source/Assets.xcassets/icon/coin_icon_07.imageset/Contents.json
new file mode 100644
index 0000000..2d19a19
--- /dev/null
+++ b/MoviaBox/Source/Assets.xcassets/icon/coin_icon_07.imageset/Contents.json
@@ -0,0 +1,22 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "image 21@2x.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "image 21@3x.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/MoviaBox/Source/Assets.xcassets/icon/coin_icon_07.imageset/image 21@2x.png b/MoviaBox/Source/Assets.xcassets/icon/coin_icon_07.imageset/image 21@2x.png
new file mode 100644
index 0000000..d353352
Binary files /dev/null and b/MoviaBox/Source/Assets.xcassets/icon/coin_icon_07.imageset/image 21@2x.png differ
diff --git a/MoviaBox/Source/Assets.xcassets/icon/coin_icon_07.imageset/image 21@3x.png b/MoviaBox/Source/Assets.xcassets/icon/coin_icon_07.imageset/image 21@3x.png
new file mode 100644
index 0000000..2e0a9af
Binary files /dev/null and b/MoviaBox/Source/Assets.xcassets/icon/coin_icon_07.imageset/image 21@3x.png differ
diff --git a/MoviaBox/Source/Assets.xcassets/icon/coin_icon_08.imageset/Contents.json b/MoviaBox/Source/Assets.xcassets/icon/coin_icon_08.imageset/Contents.json
new file mode 100644
index 0000000..fbfabb8
--- /dev/null
+++ b/MoviaBox/Source/Assets.xcassets/icon/coin_icon_08.imageset/Contents.json
@@ -0,0 +1,22 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "Frame 1912057037@2x.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "Frame 1912057037@3x.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/MoviaBox/Source/Assets.xcassets/icon/coin_icon_08.imageset/Frame 1912057037@2x.png b/MoviaBox/Source/Assets.xcassets/icon/coin_icon_08.imageset/Frame 1912057037@2x.png
new file mode 100644
index 0000000..65c56ea
Binary files /dev/null and b/MoviaBox/Source/Assets.xcassets/icon/coin_icon_08.imageset/Frame 1912057037@2x.png differ
diff --git a/MoviaBox/Source/Assets.xcassets/icon/coin_icon_08.imageset/Frame 1912057037@3x.png b/MoviaBox/Source/Assets.xcassets/icon/coin_icon_08.imageset/Frame 1912057037@3x.png
new file mode 100644
index 0000000..7fcb5af
Binary files /dev/null and b/MoviaBox/Source/Assets.xcassets/icon/coin_icon_08.imageset/Frame 1912057037@3x.png differ
diff --git a/MoviaBox/Source/Assets.xcassets/icon/hot_icon_03.imageset/Contents.json b/MoviaBox/Source/Assets.xcassets/icon/hot_icon_03.imageset/Contents.json
new file mode 100644
index 0000000..7a5fb1f
--- /dev/null
+++ b/MoviaBox/Source/Assets.xcassets/icon/hot_icon_03.imageset/Contents.json
@@ -0,0 +1,22 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "花瓣素材_emoji热门HOT火焰图形贴纸_193856377 1@2x.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "花瓣素材_emoji热门HOT火焰图形贴纸_193856377 1@3x.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/MoviaBox/Source/Assets.xcassets/icon/hot_icon_03.imageset/花瓣素材_emoji热门HOT火焰图形贴纸_193856377 1@2x.png b/MoviaBox/Source/Assets.xcassets/icon/hot_icon_03.imageset/花瓣素材_emoji热门HOT火焰图形贴纸_193856377 1@2x.png
new file mode 100644
index 0000000..964fa9b
Binary files /dev/null and b/MoviaBox/Source/Assets.xcassets/icon/hot_icon_03.imageset/花瓣素材_emoji热门HOT火焰图形贴纸_193856377 1@2x.png differ
diff --git a/MoviaBox/Source/Assets.xcassets/icon/hot_icon_03.imageset/花瓣素材_emoji热门HOT火焰图形贴纸_193856377 1@3x.png b/MoviaBox/Source/Assets.xcassets/icon/hot_icon_03.imageset/花瓣素材_emoji热门HOT火焰图形贴纸_193856377 1@3x.png
new file mode 100644
index 0000000..04b077a
Binary files /dev/null and b/MoviaBox/Source/Assets.xcassets/icon/hot_icon_03.imageset/花瓣素材_emoji热门HOT火焰图形贴纸_193856377 1@3x.png differ
diff --git a/MoviaBox/Source/Assets.xcassets/icon/mark_bg_icon_01.imageset/Contents.json b/MoviaBox/Source/Assets.xcassets/icon/mark_bg_icon_01.imageset/Contents.json
new file mode 100644
index 0000000..146dd71
--- /dev/null
+++ b/MoviaBox/Source/Assets.xcassets/icon/mark_bg_icon_01.imageset/Contents.json
@@ -0,0 +1,22 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "角标@2x.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "角标@3x.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/MoviaBox/Source/Assets.xcassets/icon/mark_bg_icon_01.imageset/角标@2x.png b/MoviaBox/Source/Assets.xcassets/icon/mark_bg_icon_01.imageset/角标@2x.png
new file mode 100644
index 0000000..3e8f42c
Binary files /dev/null and b/MoviaBox/Source/Assets.xcassets/icon/mark_bg_icon_01.imageset/角标@2x.png differ
diff --git a/MoviaBox/Source/Assets.xcassets/icon/mark_bg_icon_01.imageset/角标@3x.png b/MoviaBox/Source/Assets.xcassets/icon/mark_bg_icon_01.imageset/角标@3x.png
new file mode 100644
index 0000000..9bd8769
Binary files /dev/null and b/MoviaBox/Source/Assets.xcassets/icon/mark_bg_icon_01.imageset/角标@3x.png differ
diff --git a/MoviaBox/Source/Assets.xcassets/icon/mark_bg_icon_02.imageset/Contents.json b/MoviaBox/Source/Assets.xcassets/icon/mark_bg_icon_02.imageset/Contents.json
new file mode 100644
index 0000000..146dd71
--- /dev/null
+++ b/MoviaBox/Source/Assets.xcassets/icon/mark_bg_icon_02.imageset/Contents.json
@@ -0,0 +1,22 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "角标@2x.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "角标@3x.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/MoviaBox/Source/Assets.xcassets/icon/mark_bg_icon_02.imageset/角标@2x.png b/MoviaBox/Source/Assets.xcassets/icon/mark_bg_icon_02.imageset/角标@2x.png
new file mode 100644
index 0000000..5ec0658
Binary files /dev/null and b/MoviaBox/Source/Assets.xcassets/icon/mark_bg_icon_02.imageset/角标@2x.png differ
diff --git a/MoviaBox/Source/Assets.xcassets/icon/mark_bg_icon_02.imageset/角标@3x.png b/MoviaBox/Source/Assets.xcassets/icon/mark_bg_icon_02.imageset/角标@3x.png
new file mode 100644
index 0000000..ee94866
Binary files /dev/null and b/MoviaBox/Source/Assets.xcassets/icon/mark_bg_icon_02.imageset/角标@3x.png differ
diff --git a/MoviaBox/Source/Assets.xcassets/icon/vip_icon_03.imageset/Contents.json b/MoviaBox/Source/Assets.xcassets/icon/vip_icon_03.imageset/Contents.json
index ee67ad4..8b5f287 100644
--- a/MoviaBox/Source/Assets.xcassets/icon/vip_icon_03.imageset/Contents.json
+++ b/MoviaBox/Source/Assets.xcassets/icon/vip_icon_03.imageset/Contents.json
@@ -5,12 +5,12 @@
"scale" : "1x"
},
{
- "filename" : "Subtract@2x.png",
+ "filename" : "Frame 1912057044@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
- "filename" : "Subtract@3x.png",
+ "filename" : "Frame 1912057044@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
diff --git a/MoviaBox/Source/Assets.xcassets/icon/vip_icon_03.imageset/Frame 1912057044@2x.png b/MoviaBox/Source/Assets.xcassets/icon/vip_icon_03.imageset/Frame 1912057044@2x.png
new file mode 100644
index 0000000..ae62dfc
Binary files /dev/null and b/MoviaBox/Source/Assets.xcassets/icon/vip_icon_03.imageset/Frame 1912057044@2x.png differ
diff --git a/MoviaBox/Source/Assets.xcassets/icon/vip_icon_03.imageset/Frame 1912057044@3x.png b/MoviaBox/Source/Assets.xcassets/icon/vip_icon_03.imageset/Frame 1912057044@3x.png
new file mode 100644
index 0000000..304039f
Binary files /dev/null and b/MoviaBox/Source/Assets.xcassets/icon/vip_icon_03.imageset/Frame 1912057044@3x.png differ
diff --git a/MoviaBox/Source/Assets.xcassets/icon/vip_icon_03.imageset/Subtract@2x.png b/MoviaBox/Source/Assets.xcassets/icon/vip_icon_03.imageset/Subtract@2x.png
deleted file mode 100644
index 72fe0f1..0000000
Binary files a/MoviaBox/Source/Assets.xcassets/icon/vip_icon_03.imageset/Subtract@2x.png and /dev/null differ
diff --git a/MoviaBox/Source/Assets.xcassets/icon/vip_icon_03.imageset/Subtract@3x.png b/MoviaBox/Source/Assets.xcassets/icon/vip_icon_03.imageset/Subtract@3x.png
deleted file mode 100644
index 8597bf4..0000000
Binary files a/MoviaBox/Source/Assets.xcassets/icon/vip_icon_03.imageset/Subtract@3x.png and /dev/null differ
diff --git a/MoviaBox/Source/Assets.xcassets/icon/vip_icon_04.imageset/Contents.json b/MoviaBox/Source/Assets.xcassets/icon/vip_icon_04.imageset/Contents.json
index ee67ad4..51708d4 100644
--- a/MoviaBox/Source/Assets.xcassets/icon/vip_icon_04.imageset/Contents.json
+++ b/MoviaBox/Source/Assets.xcassets/icon/vip_icon_04.imageset/Contents.json
@@ -5,12 +5,12 @@
"scale" : "1x"
},
{
- "filename" : "Subtract@2x.png",
+ "filename" : "Frame 1912057042@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
- "filename" : "Subtract@3x.png",
+ "filename" : "Frame 1912057042@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
diff --git a/MoviaBox/Source/Assets.xcassets/icon/vip_icon_04.imageset/Frame 1912057042@2x.png b/MoviaBox/Source/Assets.xcassets/icon/vip_icon_04.imageset/Frame 1912057042@2x.png
new file mode 100644
index 0000000..66eaab3
Binary files /dev/null and b/MoviaBox/Source/Assets.xcassets/icon/vip_icon_04.imageset/Frame 1912057042@2x.png differ
diff --git a/MoviaBox/Source/Assets.xcassets/icon/vip_icon_04.imageset/Frame 1912057042@3x.png b/MoviaBox/Source/Assets.xcassets/icon/vip_icon_04.imageset/Frame 1912057042@3x.png
new file mode 100644
index 0000000..49968fb
Binary files /dev/null and b/MoviaBox/Source/Assets.xcassets/icon/vip_icon_04.imageset/Frame 1912057042@3x.png differ
diff --git a/MoviaBox/Source/Assets.xcassets/icon/vip_icon_04.imageset/Subtract@2x.png b/MoviaBox/Source/Assets.xcassets/icon/vip_icon_04.imageset/Subtract@2x.png
deleted file mode 100644
index 8b2a4a5..0000000
Binary files a/MoviaBox/Source/Assets.xcassets/icon/vip_icon_04.imageset/Subtract@2x.png and /dev/null differ
diff --git a/MoviaBox/Source/Assets.xcassets/icon/vip_icon_04.imageset/Subtract@3x.png b/MoviaBox/Source/Assets.xcassets/icon/vip_icon_04.imageset/Subtract@3x.png
deleted file mode 100644
index a49bbbc..0000000
Binary files a/MoviaBox/Source/Assets.xcassets/icon/vip_icon_04.imageset/Subtract@3x.png and /dev/null differ
diff --git a/MoviaBox/Source/Assets.xcassets/icon/vip_icon_10.imageset/Contents.json b/MoviaBox/Source/Assets.xcassets/icon/vip_icon_10.imageset/Contents.json
new file mode 100644
index 0000000..b3cf7a3
--- /dev/null
+++ b/MoviaBox/Source/Assets.xcassets/icon/vip_icon_10.imageset/Contents.json
@@ -0,0 +1,22 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "Frame 1912057045@2x.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "Frame 1912057045@3x.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/MoviaBox/Source/Assets.xcassets/icon/vip_icon_10.imageset/Frame 1912057045@2x.png b/MoviaBox/Source/Assets.xcassets/icon/vip_icon_10.imageset/Frame 1912057045@2x.png
new file mode 100644
index 0000000..072037a
Binary files /dev/null and b/MoviaBox/Source/Assets.xcassets/icon/vip_icon_10.imageset/Frame 1912057045@2x.png differ
diff --git a/MoviaBox/Source/Assets.xcassets/icon/vip_icon_10.imageset/Frame 1912057045@3x.png b/MoviaBox/Source/Assets.xcassets/icon/vip_icon_10.imageset/Frame 1912057045@3x.png
new file mode 100644
index 0000000..f081b76
Binary files /dev/null and b/MoviaBox/Source/Assets.xcassets/icon/vip_icon_10.imageset/Frame 1912057045@3x.png differ
diff --git a/MoviaBox/Source/Assets.xcassets/image/money_bg_image_01.imageset/Contents.json b/MoviaBox/Source/Assets.xcassets/image/money_bg_image_01.imageset/Contents.json
new file mode 100644
index 0000000..a19a549
--- /dev/null
+++ b/MoviaBox/Source/Assets.xcassets/image/money_bg_image_01.imageset/Contents.json
@@ -0,0 +1,20 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/MoviaBox/Source/Assets.xcassets/image/recharge_bg_big_image_01.imageset/Contents.json b/MoviaBox/Source/Assets.xcassets/image/recharge_bg_big_image_01.imageset/Contents.json
new file mode 100644
index 0000000..331db2c
--- /dev/null
+++ b/MoviaBox/Source/Assets.xcassets/image/recharge_bg_big_image_01.imageset/Contents.json
@@ -0,0 +1,22 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "Rectangle 52@2x.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "Rectangle 52@3x.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/MoviaBox/Source/Assets.xcassets/image/recharge_bg_big_image_01.imageset/Rectangle 52@2x.png b/MoviaBox/Source/Assets.xcassets/image/recharge_bg_big_image_01.imageset/Rectangle 52@2x.png
new file mode 100644
index 0000000..a2e0601
Binary files /dev/null and b/MoviaBox/Source/Assets.xcassets/image/recharge_bg_big_image_01.imageset/Rectangle 52@2x.png differ
diff --git a/MoviaBox/Source/Assets.xcassets/image/recharge_bg_big_image_01.imageset/Rectangle 52@3x.png b/MoviaBox/Source/Assets.xcassets/image/recharge_bg_big_image_01.imageset/Rectangle 52@3x.png
new file mode 100644
index 0000000..35010aa
Binary files /dev/null and b/MoviaBox/Source/Assets.xcassets/image/recharge_bg_big_image_01.imageset/Rectangle 52@3x.png differ
diff --git a/MoviaBox/Source/Assets.xcassets/image/recharge_bg_big_image_02.imageset/Contents.json b/MoviaBox/Source/Assets.xcassets/image/recharge_bg_big_image_02.imageset/Contents.json
new file mode 100644
index 0000000..331db2c
--- /dev/null
+++ b/MoviaBox/Source/Assets.xcassets/image/recharge_bg_big_image_02.imageset/Contents.json
@@ -0,0 +1,22 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "Rectangle 52@2x.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "Rectangle 52@3x.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/MoviaBox/Source/Assets.xcassets/image/recharge_bg_big_image_02.imageset/Rectangle 52@2x.png b/MoviaBox/Source/Assets.xcassets/image/recharge_bg_big_image_02.imageset/Rectangle 52@2x.png
new file mode 100644
index 0000000..d9a9fc1
Binary files /dev/null and b/MoviaBox/Source/Assets.xcassets/image/recharge_bg_big_image_02.imageset/Rectangle 52@2x.png differ
diff --git a/MoviaBox/Source/Assets.xcassets/image/recharge_bg_big_image_02.imageset/Rectangle 52@3x.png b/MoviaBox/Source/Assets.xcassets/image/recharge_bg_big_image_02.imageset/Rectangle 52@3x.png
new file mode 100644
index 0000000..d225a66
Binary files /dev/null and b/MoviaBox/Source/Assets.xcassets/image/recharge_bg_big_image_02.imageset/Rectangle 52@3x.png differ
diff --git a/MoviaBox/Source/Assets.xcassets/image/recharge_bg_image_01.imageset/Contents.json b/MoviaBox/Source/Assets.xcassets/image/recharge_bg_image_01.imageset/Contents.json
index 452f8a6..7dcd974 100644
--- a/MoviaBox/Source/Assets.xcassets/image/recharge_bg_image_01.imageset/Contents.json
+++ b/MoviaBox/Source/Assets.xcassets/image/recharge_bg_image_01.imageset/Contents.json
@@ -5,12 +5,12 @@
"scale" : "1x"
},
{
- "filename" : "Frame 1912056629@2x.png",
+ "filename" : "选中@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
- "filename" : "Frame 1912056629@3x.png",
+ "filename" : "选中@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
diff --git a/MoviaBox/Source/Assets.xcassets/image/recharge_bg_image_01.imageset/Frame 1912056629@2x.png b/MoviaBox/Source/Assets.xcassets/image/recharge_bg_image_01.imageset/Frame 1912056629@2x.png
deleted file mode 100644
index d551807..0000000
Binary files a/MoviaBox/Source/Assets.xcassets/image/recharge_bg_image_01.imageset/Frame 1912056629@2x.png and /dev/null differ
diff --git a/MoviaBox/Source/Assets.xcassets/image/recharge_bg_image_01.imageset/Frame 1912056629@3x.png b/MoviaBox/Source/Assets.xcassets/image/recharge_bg_image_01.imageset/Frame 1912056629@3x.png
deleted file mode 100644
index 737a836..0000000
Binary files a/MoviaBox/Source/Assets.xcassets/image/recharge_bg_image_01.imageset/Frame 1912056629@3x.png and /dev/null differ
diff --git a/MoviaBox/Source/Assets.xcassets/image/recharge_bg_image_01.imageset/选中@2x.png b/MoviaBox/Source/Assets.xcassets/image/recharge_bg_image_01.imageset/选中@2x.png
new file mode 100644
index 0000000..4e32900
Binary files /dev/null and b/MoviaBox/Source/Assets.xcassets/image/recharge_bg_image_01.imageset/选中@2x.png differ
diff --git a/MoviaBox/Source/Assets.xcassets/image/recharge_bg_image_01.imageset/选中@3x.png b/MoviaBox/Source/Assets.xcassets/image/recharge_bg_image_01.imageset/选中@3x.png
new file mode 100644
index 0000000..b9dd22e
Binary files /dev/null and b/MoviaBox/Source/Assets.xcassets/image/recharge_bg_image_01.imageset/选中@3x.png differ
diff --git a/MoviaBox/Source/Assets.xcassets/image/recharge_bg_image_02.imageset/Contents.json b/MoviaBox/Source/Assets.xcassets/image/recharge_bg_image_02.imageset/Contents.json
index a65825a..3c37a87 100644
--- a/MoviaBox/Source/Assets.xcassets/image/recharge_bg_image_02.imageset/Contents.json
+++ b/MoviaBox/Source/Assets.xcassets/image/recharge_bg_image_02.imageset/Contents.json
@@ -5,12 +5,12 @@
"scale" : "1x"
},
{
- "filename" : "Frame 1912056630@2x.png",
+ "filename" : "默认@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
- "filename" : "Frame 1912056630@3x.png",
+ "filename" : "默认@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
diff --git a/MoviaBox/Source/Assets.xcassets/image/recharge_bg_image_02.imageset/Frame 1912056630@2x.png b/MoviaBox/Source/Assets.xcassets/image/recharge_bg_image_02.imageset/Frame 1912056630@2x.png
deleted file mode 100644
index 7f925d6..0000000
Binary files a/MoviaBox/Source/Assets.xcassets/image/recharge_bg_image_02.imageset/Frame 1912056630@2x.png and /dev/null differ
diff --git a/MoviaBox/Source/Assets.xcassets/image/recharge_bg_image_02.imageset/Frame 1912056630@3x.png b/MoviaBox/Source/Assets.xcassets/image/recharge_bg_image_02.imageset/Frame 1912056630@3x.png
deleted file mode 100644
index ede9210..0000000
Binary files a/MoviaBox/Source/Assets.xcassets/image/recharge_bg_image_02.imageset/Frame 1912056630@3x.png and /dev/null differ
diff --git a/MoviaBox/Source/Assets.xcassets/image/recharge_bg_image_02.imageset/默认@2x.png b/MoviaBox/Source/Assets.xcassets/image/recharge_bg_image_02.imageset/默认@2x.png
new file mode 100644
index 0000000..77a913a
Binary files /dev/null and b/MoviaBox/Source/Assets.xcassets/image/recharge_bg_image_02.imageset/默认@2x.png differ
diff --git a/MoviaBox/Source/Assets.xcassets/image/recharge_bg_image_02.imageset/默认@3x.png b/MoviaBox/Source/Assets.xcassets/image/recharge_bg_image_02.imageset/默认@3x.png
new file mode 100644
index 0000000..6749294
Binary files /dev/null and b/MoviaBox/Source/Assets.xcassets/image/recharge_bg_image_02.imageset/默认@3x.png differ
diff --git a/MoviaBox/Source/Assets.xcassets/image/vip_bg_image_01.imageset/Contents.json b/MoviaBox/Source/Assets.xcassets/image/vip_bg_image_01.imageset/Contents.json
new file mode 100644
index 0000000..34fb69f
--- /dev/null
+++ b/MoviaBox/Source/Assets.xcassets/image/vip_bg_image_01.imageset/Contents.json
@@ -0,0 +1,22 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "Frame 1912057028@2x.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "Frame 1912057028@3x.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/MoviaBox/Source/Assets.xcassets/image/vip_bg_image_01.imageset/Frame 1912057028@2x.png b/MoviaBox/Source/Assets.xcassets/image/vip_bg_image_01.imageset/Frame 1912057028@2x.png
new file mode 100644
index 0000000..9be176b
Binary files /dev/null and b/MoviaBox/Source/Assets.xcassets/image/vip_bg_image_01.imageset/Frame 1912057028@2x.png differ
diff --git a/MoviaBox/Source/Assets.xcassets/image/vip_bg_image_01.imageset/Frame 1912057028@3x.png b/MoviaBox/Source/Assets.xcassets/image/vip_bg_image_01.imageset/Frame 1912057028@3x.png
new file mode 100644
index 0000000..2b3f6c0
Binary files /dev/null and b/MoviaBox/Source/Assets.xcassets/image/vip_bg_image_01.imageset/Frame 1912057028@3x.png differ
diff --git a/MoviaBox/Source/Assets.xcassets/image/vip_bg_image_02.imageset/Contents.json b/MoviaBox/Source/Assets.xcassets/image/vip_bg_image_02.imageset/Contents.json
new file mode 100644
index 0000000..fae5f98
--- /dev/null
+++ b/MoviaBox/Source/Assets.xcassets/image/vip_bg_image_02.imageset/Contents.json
@@ -0,0 +1,22 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "Frame 1912057027@2x.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "Frame 1912057027@3x.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/MoviaBox/Source/Assets.xcassets/image/vip_bg_image_02.imageset/Frame 1912057027@2x.png b/MoviaBox/Source/Assets.xcassets/image/vip_bg_image_02.imageset/Frame 1912057027@2x.png
new file mode 100644
index 0000000..488c111
Binary files /dev/null and b/MoviaBox/Source/Assets.xcassets/image/vip_bg_image_02.imageset/Frame 1912057027@2x.png differ
diff --git a/MoviaBox/Source/Assets.xcassets/image/vip_bg_image_02.imageset/Frame 1912057027@3x.png b/MoviaBox/Source/Assets.xcassets/image/vip_bg_image_02.imageset/Frame 1912057027@3x.png
new file mode 100644
index 0000000..1099268
Binary files /dev/null and b/MoviaBox/Source/Assets.xcassets/image/vip_bg_image_02.imageset/Frame 1912057027@3x.png differ
diff --git a/MoviaBox/Source/Assets.xcassets/image/vip_bg_image_03.imageset/Contents.json b/MoviaBox/Source/Assets.xcassets/image/vip_bg_image_03.imageset/Contents.json
new file mode 100644
index 0000000..88536b7
--- /dev/null
+++ b/MoviaBox/Source/Assets.xcassets/image/vip_bg_image_03.imageset/Contents.json
@@ -0,0 +1,22 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "Frame 1912057025@2x.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "Frame 1912057025@3x.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/MoviaBox/Source/Assets.xcassets/image/vip_bg_image_03.imageset/Frame 1912057025@2x.png b/MoviaBox/Source/Assets.xcassets/image/vip_bg_image_03.imageset/Frame 1912057025@2x.png
new file mode 100644
index 0000000..51acf40
Binary files /dev/null and b/MoviaBox/Source/Assets.xcassets/image/vip_bg_image_03.imageset/Frame 1912057025@2x.png differ
diff --git a/MoviaBox/Source/Assets.xcassets/image/vip_bg_image_03.imageset/Frame 1912057025@3x.png b/MoviaBox/Source/Assets.xcassets/image/vip_bg_image_03.imageset/Frame 1912057025@3x.png
new file mode 100644
index 0000000..0d64862
Binary files /dev/null and b/MoviaBox/Source/Assets.xcassets/image/vip_bg_image_03.imageset/Frame 1912057025@3x.png differ
diff --git a/MoviaBox/Source/Assets.xcassets/image/vip_bg_image_04.imageset/Contents.json b/MoviaBox/Source/Assets.xcassets/image/vip_bg_image_04.imageset/Contents.json
new file mode 100644
index 0000000..6f48760
--- /dev/null
+++ b/MoviaBox/Source/Assets.xcassets/image/vip_bg_image_04.imageset/Contents.json
@@ -0,0 +1,22 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "Frame 1912057026@2x.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "Frame 1912057026@3x.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/MoviaBox/Source/Assets.xcassets/image/vip_bg_image_04.imageset/Frame 1912057026@2x.png b/MoviaBox/Source/Assets.xcassets/image/vip_bg_image_04.imageset/Frame 1912057026@2x.png
new file mode 100644
index 0000000..de65879
Binary files /dev/null and b/MoviaBox/Source/Assets.xcassets/image/vip_bg_image_04.imageset/Frame 1912057026@2x.png differ
diff --git a/MoviaBox/Source/Assets.xcassets/image/vip_bg_image_04.imageset/Frame 1912057026@3x.png b/MoviaBox/Source/Assets.xcassets/image/vip_bg_image_04.imageset/Frame 1912057026@3x.png
new file mode 100644
index 0000000..efdadbc
Binary files /dev/null and b/MoviaBox/Source/Assets.xcassets/image/vip_bg_image_04.imageset/Frame 1912057026@3x.png differ
diff --git a/MoviaBox/Source/Assets.xcassets/image/vip_image_01.imageset/Contents.json b/MoviaBox/Source/Assets.xcassets/image/vip_image_01.imageset/Contents.json
index 6ab4b89..dc5cc6b 100644
--- a/MoviaBox/Source/Assets.xcassets/image/vip_image_01.imageset/Contents.json
+++ b/MoviaBox/Source/Assets.xcassets/image/vip_image_01.imageset/Contents.json
@@ -5,12 +5,12 @@
"scale" : "1x"
},
{
- "filename" : "分组 3@2x.png",
+ "filename" : "Frame 1912057023 1@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
- "filename" : "分组 3@3x.png",
+ "filename" : "Frame 1912057023 1@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
diff --git a/MoviaBox/Source/Assets.xcassets/image/vip_image_01.imageset/Frame 1912057023 1@2x.png b/MoviaBox/Source/Assets.xcassets/image/vip_image_01.imageset/Frame 1912057023 1@2x.png
new file mode 100644
index 0000000..079e3b1
Binary files /dev/null and b/MoviaBox/Source/Assets.xcassets/image/vip_image_01.imageset/Frame 1912057023 1@2x.png differ
diff --git a/MoviaBox/Source/Assets.xcassets/image/vip_image_01.imageset/Frame 1912057023 1@3x.png b/MoviaBox/Source/Assets.xcassets/image/vip_image_01.imageset/Frame 1912057023 1@3x.png
new file mode 100644
index 0000000..816cd04
Binary files /dev/null and b/MoviaBox/Source/Assets.xcassets/image/vip_image_01.imageset/Frame 1912057023 1@3x.png differ
diff --git a/MoviaBox/Source/Assets.xcassets/image/vip_image_01.imageset/分组 3@2x.png b/MoviaBox/Source/Assets.xcassets/image/vip_image_01.imageset/分组 3@2x.png
deleted file mode 100644
index ecf7b89..0000000
Binary files a/MoviaBox/Source/Assets.xcassets/image/vip_image_01.imageset/分组 3@2x.png and /dev/null differ
diff --git a/MoviaBox/Source/Assets.xcassets/image/vip_image_01.imageset/分组 3@3x.png b/MoviaBox/Source/Assets.xcassets/image/vip_image_01.imageset/分组 3@3x.png
deleted file mode 100644
index 7643920..0000000
Binary files a/MoviaBox/Source/Assets.xcassets/image/vip_image_01.imageset/分组 3@3x.png and /dev/null differ
diff --git a/MoviaBox/Source/Assets.xcassets/image/vip_image_02.imageset/Contents.json b/MoviaBox/Source/Assets.xcassets/image/vip_image_02.imageset/Contents.json
index 43eed45..dc5cc6b 100644
--- a/MoviaBox/Source/Assets.xcassets/image/vip_image_02.imageset/Contents.json
+++ b/MoviaBox/Source/Assets.xcassets/image/vip_image_02.imageset/Contents.json
@@ -5,12 +5,12 @@
"scale" : "1x"
},
{
- "filename" : "分组 2@2x.png",
+ "filename" : "Frame 1912057023 1@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
- "filename" : "分组 2@3x.png",
+ "filename" : "Frame 1912057023 1@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
diff --git a/MoviaBox/Source/Assets.xcassets/image/vip_image_02.imageset/Frame 1912057023 1@2x.png b/MoviaBox/Source/Assets.xcassets/image/vip_image_02.imageset/Frame 1912057023 1@2x.png
new file mode 100644
index 0000000..273b8d1
Binary files /dev/null and b/MoviaBox/Source/Assets.xcassets/image/vip_image_02.imageset/Frame 1912057023 1@2x.png differ
diff --git a/MoviaBox/Source/Assets.xcassets/image/vip_image_02.imageset/Frame 1912057023 1@3x.png b/MoviaBox/Source/Assets.xcassets/image/vip_image_02.imageset/Frame 1912057023 1@3x.png
new file mode 100644
index 0000000..ae7889c
Binary files /dev/null and b/MoviaBox/Source/Assets.xcassets/image/vip_image_02.imageset/Frame 1912057023 1@3x.png differ
diff --git a/MoviaBox/Source/Assets.xcassets/image/vip_image_02.imageset/分组 2@2x.png b/MoviaBox/Source/Assets.xcassets/image/vip_image_02.imageset/分组 2@2x.png
deleted file mode 100644
index d08d8ff..0000000
Binary files a/MoviaBox/Source/Assets.xcassets/image/vip_image_02.imageset/分组 2@2x.png and /dev/null differ
diff --git a/MoviaBox/Source/Assets.xcassets/image/vip_image_02.imageset/分组 2@3x.png b/MoviaBox/Source/Assets.xcassets/image/vip_image_02.imageset/分组 2@3x.png
deleted file mode 100644
index 93ce2f0..0000000
Binary files a/MoviaBox/Source/Assets.xcassets/image/vip_image_02.imageset/分组 2@3x.png and /dev/null differ
diff --git a/MoviaBox/Source/Assets.xcassets/image/vip_image_03.imageset/Contents.json b/MoviaBox/Source/Assets.xcassets/image/vip_image_03.imageset/Contents.json
index 43eed45..dc5cc6b 100644
--- a/MoviaBox/Source/Assets.xcassets/image/vip_image_03.imageset/Contents.json
+++ b/MoviaBox/Source/Assets.xcassets/image/vip_image_03.imageset/Contents.json
@@ -5,12 +5,12 @@
"scale" : "1x"
},
{
- "filename" : "分组 2@2x.png",
+ "filename" : "Frame 1912057023 1@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
- "filename" : "分组 2@3x.png",
+ "filename" : "Frame 1912057023 1@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
diff --git a/MoviaBox/Source/Assets.xcassets/image/vip_image_03.imageset/Frame 1912057023 1@2x.png b/MoviaBox/Source/Assets.xcassets/image/vip_image_03.imageset/Frame 1912057023 1@2x.png
new file mode 100644
index 0000000..be4acd5
Binary files /dev/null and b/MoviaBox/Source/Assets.xcassets/image/vip_image_03.imageset/Frame 1912057023 1@2x.png differ
diff --git a/MoviaBox/Source/Assets.xcassets/image/vip_image_03.imageset/Frame 1912057023 1@3x.png b/MoviaBox/Source/Assets.xcassets/image/vip_image_03.imageset/Frame 1912057023 1@3x.png
new file mode 100644
index 0000000..21bdbce
Binary files /dev/null and b/MoviaBox/Source/Assets.xcassets/image/vip_image_03.imageset/Frame 1912057023 1@3x.png differ
diff --git a/MoviaBox/Source/Assets.xcassets/image/vip_image_03.imageset/分组 2@2x.png b/MoviaBox/Source/Assets.xcassets/image/vip_image_03.imageset/分组 2@2x.png
deleted file mode 100644
index 601a0a6..0000000
Binary files a/MoviaBox/Source/Assets.xcassets/image/vip_image_03.imageset/分组 2@2x.png and /dev/null differ
diff --git a/MoviaBox/Source/Assets.xcassets/image/vip_image_03.imageset/分组 2@3x.png b/MoviaBox/Source/Assets.xcassets/image/vip_image_03.imageset/分组 2@3x.png
deleted file mode 100644
index 4f4f326..0000000
Binary files a/MoviaBox/Source/Assets.xcassets/image/vip_image_03.imageset/分组 2@3x.png and /dev/null differ
diff --git a/MoviaBox/Source/Assets.xcassets/image/vip_image_04.imageset/Contents.json b/MoviaBox/Source/Assets.xcassets/image/vip_image_04.imageset/Contents.json
index 43eed45..dc5cc6b 100644
--- a/MoviaBox/Source/Assets.xcassets/image/vip_image_04.imageset/Contents.json
+++ b/MoviaBox/Source/Assets.xcassets/image/vip_image_04.imageset/Contents.json
@@ -5,12 +5,12 @@
"scale" : "1x"
},
{
- "filename" : "分组 2@2x.png",
+ "filename" : "Frame 1912057023 1@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
- "filename" : "分组 2@3x.png",
+ "filename" : "Frame 1912057023 1@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
diff --git a/MoviaBox/Source/Assets.xcassets/image/vip_image_04.imageset/Frame 1912057023 1@2x.png b/MoviaBox/Source/Assets.xcassets/image/vip_image_04.imageset/Frame 1912057023 1@2x.png
new file mode 100644
index 0000000..12c215d
Binary files /dev/null and b/MoviaBox/Source/Assets.xcassets/image/vip_image_04.imageset/Frame 1912057023 1@2x.png differ
diff --git a/MoviaBox/Source/Assets.xcassets/image/vip_image_04.imageset/Frame 1912057023 1@3x.png b/MoviaBox/Source/Assets.xcassets/image/vip_image_04.imageset/Frame 1912057023 1@3x.png
new file mode 100644
index 0000000..b64f8c0
Binary files /dev/null and b/MoviaBox/Source/Assets.xcassets/image/vip_image_04.imageset/Frame 1912057023 1@3x.png differ
diff --git a/MoviaBox/Source/Assets.xcassets/image/vip_image_04.imageset/分组 2@2x.png b/MoviaBox/Source/Assets.xcassets/image/vip_image_04.imageset/分组 2@2x.png
deleted file mode 100644
index 571b468..0000000
Binary files a/MoviaBox/Source/Assets.xcassets/image/vip_image_04.imageset/分组 2@2x.png and /dev/null differ
diff --git a/MoviaBox/Source/Assets.xcassets/image/vip_image_04.imageset/分组 2@3x.png b/MoviaBox/Source/Assets.xcassets/image/vip_image_04.imageset/分组 2@3x.png
deleted file mode 100644
index 18ff216..0000000
Binary files a/MoviaBox/Source/Assets.xcassets/image/vip_image_04.imageset/分组 2@3x.png and /dev/null differ
diff --git a/MoviaBox/Source/Font/Inter-ExtraBold-5.otf b/MoviaBox/Source/Font/Inter-ExtraBold-5.otf
new file mode 100644
index 0000000..7410f73
Binary files /dev/null and b/MoviaBox/Source/Font/Inter-ExtraBold-5.otf differ
diff --git a/MoviaBox/Source/Info.plist b/MoviaBox/Source/Info.plist
index 9b08ccf..de3714c 100644
--- a/MoviaBox/Source/Info.plist
+++ b/MoviaBox/Source/Info.plist
@@ -39,6 +39,10 @@
fbapi
fb-messenger-share-api
+ UIAppFonts
+
+ Inter-ExtraBold-5.otf
+
UIApplicationSceneManifest
UIApplicationSupportsMultipleScenes
diff --git a/MoviaBox/Source/en.lproj/Localizable.strings b/MoviaBox/Source/en.lproj/Localizable.strings
index 46585ff..807ca94 100644
--- a/MoviaBox/Source/en.lproj/Localizable.strings
+++ b/MoviaBox/Source/en.lproj/Localizable.strings
@@ -115,6 +115,13 @@
"movia_vip_membership" = "VIP Membership";
"movia_library" = "Library";
"movia_watched_episode" = "Watched EP##";
+"movia_coins_extra_days" = "Coins expire in ## days";
+"movia_member_tip_text" = "Auto renew,cancel anytime";
+"week_short_type" = "Weekly ";
+"month_short_type" = "Monthly";
+"quarter_short_type" = "Quarterly ";
+"year_short_type" = "Yearly";
+"movia_profile_Bonus" = "Bonus";
"movia_vip_alert_text_01" = "Short Drama VIP Exclusive";
diff --git a/MoviaBox/Thirdparty/FlowLayout/WaterfallMutiSectionFlowLayout.swift b/MoviaBox/Thirdparty/FlowLayout/WaterfallMutiSectionFlowLayout.swift
new file mode 100644
index 0000000..f79d863
--- /dev/null
+++ b/MoviaBox/Thirdparty/FlowLayout/WaterfallMutiSectionFlowLayout.swift
@@ -0,0 +1,193 @@
+//
+// WaterfallMutiSectionFlowLayout.swift
+// gymbo
+//
+// Created by drogan Zheng on 2020/5/7.
+// Copyright © 2020 Gymbo.co. All rights reserved.
+// https://github.com/RoganZheng/WaterfallMultiSectionFlowLayout
+//
+
+import UIKit
+
+@objc protocol WaterfallMutiSectionDelegate: NSObjectProtocol {
+ // 必选delegate实现
+ /// collectionItem高度
+ func heightForRowAtIndexPath(collectionView collection: UICollectionView, layout: WaterfallMutiSectionFlowLayout, indexPath: IndexPath, itemWidth: CGFloat) -> CGFloat
+
+ // 可选delegate实现
+ /// 每个section 列数(默认2列)
+ @objc optional func columnNumber(collectionView collection: UICollectionView, layout: WaterfallMutiSectionFlowLayout, section: Int) -> Int
+
+ /// header高度(默认为0)
+ @objc optional func referenceSizeForHeader(collectionView collection: UICollectionView, layout: WaterfallMutiSectionFlowLayout, section: Int) -> CGSize
+
+ /// footer高度(默认为0)
+ @objc optional func referenceSizeForFooter(collectionView collection: UICollectionView, layout: WaterfallMutiSectionFlowLayout, section: Int) -> CGSize
+
+ /// 每个section 边距(默认为0)
+ @objc optional func insetForSection(collectionView collection: UICollectionView, layout: WaterfallMutiSectionFlowLayout, section: Int) -> UIEdgeInsets
+
+ /// 每个section item上下间距(默认为0)
+ @objc optional func lineSpacing(collectionView collection: UICollectionView, layout: WaterfallMutiSectionFlowLayout, section: Int) -> CGFloat
+
+ /// 每个section item左右间距(默认为0)
+ @objc optional func interitemSpacing(collectionView collection: UICollectionView, layout: WaterfallMutiSectionFlowLayout, section: Int) -> CGFloat
+
+ /// section头部header与上个section尾部footer间距(默认为0)
+ @objc optional func spacingWithLastSection(collectionView collection: UICollectionView, layout: WaterfallMutiSectionFlowLayout, section: Int) -> CGFloat
+}
+
+class WaterfallMutiSectionFlowLayout: UICollectionViewFlowLayout {
+ weak var delegate: WaterfallMutiSectionDelegate?
+
+ private var sectionInsets: UIEdgeInsets = .zero
+ private var columnCount: Int = 2
+ private var lineSpacing: CGFloat = 0
+ private var interitemSpacing: CGFloat = 0
+ private var headerSize: CGSize = .zero
+ private var footerSize: CGSize = .zero
+
+ //存放attribute的数组
+ private var attrsArray: [UICollectionViewLayoutAttributes] = []
+ //存放每个section中各个列的最后一个高度
+ private var columnHeights: [CGFloat] = []
+ //collectionView的Content的高度
+ private var contentHeight: CGFloat = 0
+ //记录上个section高度最高一列的高度
+ private var lastContentHeight: CGFloat = 0
+ //每个section的header与上个section的footer距离
+ private var spacingWithLastSection: CGFloat = 0
+
+
+ override func prepare() {
+ super.prepare()
+ self.contentHeight = 0
+ self.lastContentHeight = 0
+ self.spacingWithLastSection = 0
+ self.lineSpacing = 0
+ self.sectionInsets = .zero
+ self.headerSize = .zero
+ self.footerSize = .zero
+ self.columnHeights.removeAll()
+ self.attrsArray.removeAll()
+
+ let sectionCount = self.collectionView!.numberOfSections
+ // 遍历section
+ for idx in 0.. [UICollectionViewLayoutAttributes]? {
+ return self.attrsArray
+ }
+
+ override func layoutAttributesForItem(at indexPath: IndexPath) -> UICollectionViewLayoutAttributes? {
+ if let column = self.delegate?.columnNumber?(collectionView: self.collectionView!, layout: self, section: indexPath.section) {
+ self.columnCount = column
+ }
+ if let lineSpacing = self.delegate?.lineSpacing?(collectionView: self.collectionView!, layout: self, section: indexPath.section) {
+ self.lineSpacing = lineSpacing
+ }
+ if let interitem = self.delegate?.interitemSpacing?(collectionView: self.collectionView!, layout: self, section: indexPath.section) {
+ self.interitemSpacing = interitem
+ }
+
+ let attri = UICollectionViewLayoutAttributes(forCellWith: indexPath)
+ let weight = self.collectionView!.frame.size.width
+ let itemSpacing = CGFloat(self.columnCount - 1) * self.interitemSpacing
+ let allWeight = weight - self.sectionInsets.left - self.sectionInsets.right - itemSpacing
+ let cellWeight = allWeight / CGFloat(self.columnCount)
+ let cellHeight: CGFloat = (self.delegate?.heightForRowAtIndexPath(collectionView: self.collectionView!, layout: self, indexPath: indexPath, itemWidth: cellWeight))!
+
+ var tmpMinColumn = 0
+ var minColumnHeight = self.columnHeights[0]
+ for i in 0.. columnH {
+ minColumnHeight = columnH
+ tmpMinColumn = i
+ }
+ }
+ let cellX = self.sectionInsets.left + CGFloat(tmpMinColumn) * (cellWeight + self.interitemSpacing)
+ var cellY: CGFloat = 0
+ cellY = minColumnHeight
+ if cellY != self.lastContentHeight {
+ cellY += self.lineSpacing
+ }
+
+ if self.contentHeight < minColumnHeight {
+ self.contentHeight = minColumnHeight
+ }
+
+ attri.frame = CGRect(x: cellX, y: cellY, width: cellWeight, height: cellHeight)
+ self.columnHeights[tmpMinColumn] = attri.frame.maxY
+ //取最大的
+ for i in 0.. UICollectionViewLayoutAttributes? {
+ let attri = UICollectionViewLayoutAttributes(forSupplementaryViewOfKind: elementKind, with: indexPath)
+ if elementKind == UICollectionView.elementKindSectionHeader {
+ if let headerSize = self.delegate?.referenceSizeForHeader?(collectionView: self.collectionView!, layout: self, section: indexPath.section) {
+ self.headerSize = headerSize
+ }
+ self.contentHeight += self.spacingWithLastSection
+ attri.frame = CGRect(x: 0, y: self.contentHeight, width: self.headerSize.width, height: self.headerSize.height)
+ self.contentHeight += self.headerSize.height
+ self.contentHeight += self.sectionInsets.top
+ } else if elementKind == UICollectionView.elementKindSectionFooter {
+ if let footerSize = self.delegate?.referenceSizeForFooter?(collectionView: self.collectionView!, layout: self, section: indexPath.section) {
+ self.footerSize = footerSize
+ }
+ self.contentHeight += self.sectionInsets.bottom
+ attri.frame = CGRect(x: 0, y: self.contentHeight, width: self.footerSize.width, height: self.footerSize.height)
+ self.contentHeight += self.footerSize.height
+ }
+ return attri
+ }
+
+ override var collectionViewContentSize: CGSize {
+ return CGSize(width: self.collectionView!.frame.size.width, height: self.contentHeight)
+ }
+}