更换启动图,更新应用市场关键词,1.1.0提审
@ -257,7 +257,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.0.7;
|
||||
MARKETING_VERSION = 1.1.0;
|
||||
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.1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.thimratv.app;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
|
158
MoviaBox/Class/Home/Controller/SPHomePageController.swift
Normal file
@ -0,0 +1,158 @@
|
||||
//
|
||||
// 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
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -236,13 +236,6 @@ class SPPlayerListViewController: SPViewController {
|
||||
|
||||
///当前播放进度变更 子类可重写
|
||||
func currentPlayTimeDidChange(time: Int) {
|
||||
let currentTime = self.viewModel.currentPlayer?.currentPosition ?? 0
|
||||
// let duration = self.viewModel.currentPlayer?.duration ?? 0
|
||||
//
|
||||
// var time = currentTime
|
||||
// if currentTime >= duration {
|
||||
// time = 0
|
||||
// }
|
||||
if time > 1 {
|
||||
self.viewModel.currentPlayer?.videoInfo?.play_seconds = time * 1000
|
||||
}
|
||||
|
@ -5,12 +5,12 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "启动页(MoviaBox 1.png",
|
||||
"filename" : "启动页@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "启动页(MoviaBox.png",
|
||||
"filename" : "启动页@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
BIN
MoviaBox/Source/Assets.xcassets/LaunchScreen/launch_screen_bg_image.imageset/启动页@2x.png
vendored
Normal file
After Width: | Height: | Size: 627 KiB |
BIN
MoviaBox/Source/Assets.xcassets/LaunchScreen/launch_screen_bg_image.imageset/启动页@3x.png
vendored
Normal file
After Width: | Height: | Size: 1.2 MiB |
BIN
MoviaBox/Source/Assets.xcassets/icon/coin_icon_01.imageset/Frame 1912056653@2x.png
vendored
Normal file
After Width: | Height: | Size: 3.9 KiB |
BIN
MoviaBox/Source/Assets.xcassets/icon/coin_icon_01.imageset/Frame 1912056653@3x.png
vendored
Normal file
After Width: | Height: | Size: 8.0 KiB |
22
MoviaBox/Source/Assets.xcassets/icon/coin_icon_02.imageset/Contents.json
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "Frame 1912056652@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "Frame 1912056652@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
MoviaBox/Source/Assets.xcassets/icon/coin_icon_02.imageset/Frame 1912056652@2x.png
vendored
Normal file
After Width: | Height: | Size: 4.6 KiB |
BIN
MoviaBox/Source/Assets.xcassets/icon/coin_icon_02.imageset/Frame 1912056652@3x.png
vendored
Normal file
After Width: | Height: | Size: 9.4 KiB |
BIN
MoviaBox/Source/Assets.xcassets/icon/vip_icon_03.imageset/Subtract@2x.png 10-48-12-532.png
vendored
Normal file
After Width: | Height: | Size: 563 B |
BIN
MoviaBox/Source/Assets.xcassets/icon/vip_icon_03.imageset/Subtract@3x.png 10-48-12-535.png
vendored
Normal file
After Width: | Height: | Size: 716 B |
BIN
MoviaBox/Source/Assets.xcassets/icon/vip_icon_04.imageset/Subtract@2x.png
vendored
Normal file
After Width: | Height: | Size: 357 B |
BIN
MoviaBox/Source/Assets.xcassets/icon/vip_icon_04.imageset/Subtract@3x.png
vendored
Normal file
After Width: | Height: | Size: 467 B |
@ -0,0 +1,38 @@
|
||||
{
|
||||
"colors" : [
|
||||
{
|
||||
"color" : {
|
||||
"color-space" : "srgb",
|
||||
"components" : {
|
||||
"alpha" : "1.000",
|
||||
"blue" : "1.000",
|
||||
"green" : "1.000",
|
||||
"red" : "1.000"
|
||||
}
|
||||
},
|
||||
"idiom" : "universal"
|
||||
},
|
||||
{
|
||||
"appearances" : [
|
||||
{
|
||||
"appearance" : "luminosity",
|
||||
"value" : "dark"
|
||||
}
|
||||
],
|
||||
"color" : {
|
||||
"color-space" : "srgb",
|
||||
"components" : {
|
||||
"alpha" : "1.000",
|
||||
"blue" : "1.000",
|
||||
"green" : "1.000",
|
||||
"red" : "1.000"
|
||||
}
|
||||
},
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
MoviaBox/Source/Assets.xcassets/image/recharge_bg_image_01.imageset/Frame 1912056629@2x.png
vendored
Normal file
After Width: | Height: | Size: 56 KiB |
BIN
MoviaBox/Source/Assets.xcassets/image/recharge_bg_image_01.imageset/Frame 1912056629@3x.png
vendored
Normal file
After Width: | Height: | Size: 124 KiB |
BIN
MoviaBox/Source/Assets.xcassets/image/recharge_bg_image_02.imageset/Frame 1912056630@2x.png
vendored
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
MoviaBox/Source/Assets.xcassets/image/recharge_bg_image_02.imageset/Frame 1912056630@3x.png
vendored
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
MoviaBox/Source/Assets.xcassets/image/vip_image_01.imageset/分组 3@2x.png
vendored
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
MoviaBox/Source/Assets.xcassets/image/vip_image_01.imageset/分组 3@3x.png
vendored
Normal file
After Width: | Height: | Size: 54 KiB |
BIN
MoviaBox/Source/Assets.xcassets/image/vip_image_02.imageset/分组 2@2x.png
vendored
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
MoviaBox/Source/Assets.xcassets/image/vip_image_02.imageset/分组 2@3x.png
vendored
Normal file
After Width: | Height: | Size: 50 KiB |
BIN
MoviaBox/Source/Assets.xcassets/image/vip_image_03.imageset/分组 2@2x.png 10-27-20-833.png
vendored
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
MoviaBox/Source/Assets.xcassets/image/vip_image_03.imageset/分组 2@3x.png 10-27-20-836.png
vendored
Normal file
After Width: | Height: | Size: 51 KiB |
BIN
MoviaBox/Source/Assets.xcassets/image/vip_image_04.imageset/分组 2@2x.png 10-27-10-896.png
vendored
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
MoviaBox/Source/Assets.xcassets/image/vip_image_04.imageset/分组 2@3x.png 10-27-10-911.png
vendored
Normal file
After Width: | Height: | Size: 49 KiB |