tabbar调整

This commit is contained in:
mh 2025-10-14 17:46:59 +08:00
parent da65e16a9d
commit 72b9d15aa3
64 changed files with 169 additions and 120 deletions

View File

@ -348,7 +348,7 @@
DEVELOPMENT_TEAM = 6GS5RC7C89;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.person.ChinaTravelTests;
PRODUCT_BUNDLE_IDENTIFIER = com.personal.ChinaTravelTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = NO;
SWIFT_VERSION = 5.0;
@ -366,7 +366,7 @@
DEVELOPMENT_TEAM = 6GS5RC7C89;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.person.ChinaTravelTests;
PRODUCT_BUNDLE_IDENTIFIER = com.personal.ChinaTravelTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = NO;
SWIFT_VERSION = 5.0;
@ -460,7 +460,7 @@
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.0;
PRODUCT_BUNDLE_IDENTIFIER = com.person.ChinaTravel;
PRODUCT_BUNDLE_IDENTIFIER = com.personal.ChinaTravel;
PRODUCT_NAME = Visual_Novel_iOSLevel;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = CLPRODUCT;
SWIFT_EMIT_LOC_STRINGS = YES;
@ -479,7 +479,7 @@
DEVELOPMENT_TEAM = 6GS5RC7C89;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.person.ChinaTravelTests;
PRODUCT_BUNDLE_IDENTIFIER = com.personal.ChinaTravelTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = NO;
SWIFT_VERSION = 5.0;
@ -573,7 +573,7 @@
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.0;
PRODUCT_BUNDLE_IDENTIFIER = com.person.ChinaTravel;
PRODUCT_BUNDLE_IDENTIFIER = com.personal.ChinaTravel;
PRODUCT_NAME = Visual_Novel_iOSLevel;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = CLAPPSTORE;
SWIFT_EMIT_LOC_STRINGS = YES;
@ -592,7 +592,7 @@
DEVELOPMENT_TEAM = 6GS5RC7C89;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.person.ChinaTravelTests;
PRODUCT_BUNDLE_IDENTIFIER = com.personal.ChinaTravelTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = NO;
SWIFT_VERSION = 5.0;
@ -630,7 +630,7 @@
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.0;
PRODUCT_BUNDLE_IDENTIFIER = com.person.ChinaTravel;
PRODUCT_BUNDLE_IDENTIFIER = com.personal.ChinaTravel;
PRODUCT_NAME = Visual_Novel_iOSLevel;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_OBJC_BRIDGING_HEADER = "$(SRCROOT)/Visual_Novel_iOS/CL-Bridging-Header.h";
@ -668,7 +668,7 @@
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.0;
PRODUCT_BUNDLE_IDENTIFIER = com.person.ChinaTravel;
PRODUCT_BUNDLE_IDENTIFIER = com.personal.ChinaTravel;
PRODUCT_NAME = Visual_Novel_iOSLevel;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_OBJC_BRIDGING_HEADER = "$(SRCROOT)/Visual_Novel_iOS/CL-Bridging-Header.h";

View File

@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@ -5,12 +5,12 @@
"scale" : "1x"
},
{
"filename" : "tabbar_me@2x.png",
"filename" : "base_bg@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "tabbar_me@3x.png",
"filename" : "base_bg@3x.png",
"idiom" : "universal",
"scale" : "3x"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

View File

@ -5,12 +5,12 @@
"scale" : "1x"
},
{
"filename" : "tabbar_foryou@2x.png",
"filename" : "tabbar_bg_img@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "tabbar_foryou@3x.png",
"filename" : "tabbar_bg_img@3x.png",
"idiom" : "universal",
"scale" : "3x"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 429 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 633 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 842 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 620 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 892 B

View File

@ -1,22 +0,0 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "tabbar_explore_selected@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "tabbar_explore_selected@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 622 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 846 B

View File

@ -1,22 +0,0 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "tabbar_foryou_selected@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "tabbar_foryou_selected@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

View File

@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "tabbar_history_normal@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "tabbar_history_normal@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@ -5,12 +5,12 @@
"scale" : "1x"
},
{
"filename" : "tabbar_contact_selected@2x.png",
"filename" : "tabbar_history_selected@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "tabbar_contact_selected@3x.png",
"filename" : "tabbar_history_selected@3x.png",
"idiom" : "universal",
"scale" : "3x"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@ -5,12 +5,12 @@
"scale" : "1x"
},
{
"filename" : "tabbar_create_app@2x.png",
"filename" : "tabbar_home_normal@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "tabbar_create_app@3x.png",
"filename" : "tabbar_home_normal@3x.png",
"idiom" : "universal",
"scale" : "3x"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "tabbar_home_selected@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "tabbar_home_selected@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 613 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 931 B

View File

@ -1,22 +0,0 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "tabbar_me_selected@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "tabbar_me_selected@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -5,12 +5,12 @@
"scale" : "1x"
},
{
"filename" : "tabbar_contact@2x.png",
"filename" : "base_role_normal@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "tabbar_contact@3x.png",
"filename" : "base_role_normal@3x.png",
"idiom" : "universal",
"scale" : "3x"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

@ -5,12 +5,12 @@
"scale" : "1x"
},
{
"filename" : "tabbar_explore@2x.png",
"filename" : "base_role_selected@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "tabbar_explore@3x.png",
"filename" : "base_role_selected@3x.png",
"idiom" : "universal",
"scale" : "3x"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "tabbar_video_normal@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "tabbar_video_normal@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "tabbar_video_selected@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "tabbar_video_selected@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@ -57,5 +57,7 @@
<array>
<string>audio</string>
</array>
<key>UIDesignRequiresCompatibility</key>
<true/>
</dict>
</plist>

View File

@ -59,7 +59,7 @@ class H5BaseViewController: CLBaseViewController {
lazy var closeButton: UIButton = {
let button = UIButton(type: .custom)
// button.setImage(R.image.icon_close_20(), for: .normal)
button.setImage(R.image.icon_close_20(), for: .normal)
button.addTarget(self, action: #selector(tapNaviCloseBtn), for: .touchUpInside)
button.isHidden = true
navigationView.leftStackH.addArrangedSubview(button)

View File

@ -82,7 +82,7 @@ class H5Controller: H5BaseViewController {
naviTitleIgnoreAlpha = true
setupViewsByBgColor(alpha: 0)
if didFinish {
// navigationView.backButton.setImage(R.image.nav_back_white(), for: .normal)
navigationView.backButton.setImage(R.image.nav_back_white(), for: .normal)
}
webView.evaluateJavaScript("document.body.style.backgroundColor=\"#F04545\"") { _, _ in
}

View File

@ -53,11 +53,11 @@ class ImagePicker: TZImagePickerController {
previewBtnTitleStr = "Preview" // R.string.localizable.preview.localized()
fullImageBtnTitleStr = "Original Photo" // R.string.localizable.original_photo.localized()
// photoOriginDefImage = R.image.icon_tag_gray_default()
// photoOriginSelImage = R.image.icon_tag_selected()
// photoDefImage = R.image.icon_tag_gray_default()
// photoSelImage = R.image.icon_tag_selected_bg()
// takePictureImage = R.image.icon_album_camera()
photoOriginDefImage = R.image.icon_tag_gray_default()
photoOriginSelImage = R.image.icon_tag_selected()
photoDefImage = R.image.icon_tag_gray_default()
photoSelImage = R.image.icon_tag_selected_bg()
takePictureImage = R.image.icon_album_camera()
photoPickerPageUIConfigBlock = { (_ collectionView: UICollectionView?,
_ bottomToolBar: UIView?,

View File

@ -52,7 +52,7 @@ import UIKit
@objc lazy var backButton: UIButton = {
let backButton = UIButton(type: .custom)
leftStackH.addArrangedSubview(backButton)
// backButton.setImage(R.image.nav_back_white()!, for: .normal)
backButton.setImage(R.image.nav_back_white()!, for: .normal)
backButton.contentHorizontalAlignment = .left
backButton.imageEdgeInsets = UIEdgeInsets(top: 0, left: 16, bottom: 0, right: -16)
backButton.addTarget(self, action: #selector(popAction), for: .touchUpInside)
@ -151,12 +151,12 @@ import UIKit
}
@objc open func setupBackButtonCloseIcon(black: Bool = false) {
// if black {
// backButton.setImage(R.image.icon_close_20_black(), for: .normal)
// } else {
// backButton.setImage(R.image.icon_close_20(), for: .normal)
//
// }
if black {
backButton.setImage(R.image.icon_close_20_black(), for: .normal)
} else {
backButton.setImage(R.image.icon_close_20(), for: .normal)
}
backButton.isHidden = false
}
}

View File

@ -26,6 +26,7 @@ class DiscoverRolesGridController: CLBaseGridController {
super.viewDidLoad()
// Do any additional setup after loading the view.
view.backgroundColor = .clear
setupViews()
setupDatas()
setupEvents()

View File

@ -16,9 +16,17 @@ class DiscoverRootPageController: CLTabRootController<DiscoverRootPageView> {
// Do any additional setup after loading the view.
let baseImageView = UIImageView(image: R.image.base_bg())
baseImageView.contentMode = .scaleAspectFill
self.view.insertSubview(baseImageView, at: 0)
baseImageView.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
setupViews()
setupDatas()
setupEvents()
}
private func setupViews() {

View File

@ -203,7 +203,7 @@ extension DiscoverRootPageView: JXPagingViewDelegate, JXSegmentedViewDelegate {
}
func mainTableViewDidScroll(_ scrollView: UIScrollView) {
NaviAlphaHandle.changeNaviViewsAlpha(scrollView: scrollView, alphaViews: [bgBdView, navigationView?.bgView], oppositeViews: [])
// NaviAlphaHandle.changeNaviViewsAlpha(scrollView: scrollView, alphaViews: [bgBdView, navigationView?.bgView], oppositeViews: [])
}
}

View File

@ -68,34 +68,34 @@ extension TabBarController {
viewControllers = [home, friend, discover, me]
let homeItem = TitleItem(title: "1",
image: UIImage(named: "tabbar_foryou")!,
selectedImage: UIImage(named: "tabbar_foryou_selected")!,
image: UIImage(named: "tabbar_home_normal")!,
selectedImage: UIImage(named: "tabbar_home_selected")!,
itemIndex: .home)
homeItem.count = 0
let friendItem = TitleItem(title: "2",
image: UIImage(named: "tabbar_contact")!,
selectedImage: UIImage(named: "tabbar_contact_selected")!,
image: UIImage(named: "tabbar_video_normal")!,
selectedImage: UIImage(named: "tabbar_video_selected")!,
itemIndex: .friend)
friendItem.count = 0
let discoverItem = TitleItem(title: "3",
image: UIImage(named: "tabbar_explore")!,
selectedImage: UIImage(named: "tabbar_explore_selected")!,
image: UIImage(named: "tabbar_role_normal")!,
selectedImage: UIImage(named: "tabbar_role_selected")!,
itemIndex: .discover)
let meItem = TitleItem(title: "4",
image: UIImage(named: "tabbar_me")!,
selectedImage: UIImage(named: "tabbar_me_selected")!,
image: UIImage(named: "tabbar_history_normal")!,
selectedImage: UIImage(named: "tabbar_history_selected")!,
itemIndex: .me)
meItem.count = 0
let addItem = TitleItem(title: "+",
image: UIImage(named: "tabbar_create_app")!,
selectedImage: UIImage(named: "tabbar_create_app")!,
itemIndex: .add)
// let addItem = TitleItem(title: "+",
// image: UIImage(named: "tabbar_create_app")!,
// selectedImage: UIImage(named: "tabbar_create_app")!,
// itemIndex: .add)
let childItem: [TabbarItem] = [homeItem, friendItem, addItem, discoverItem, meItem]
let childItem: [TabbarItem] = [homeItem, friendItem, /*addItem,*/ discoverItem, meItem]
customTabBar.tabItems = childItem
customTabBar.tabBarDelegate = self
setValue(customTabBar, forKey: "tabBar")

View File

@ -30,7 +30,7 @@ class TabBar: UITabBar {
}
}
static let containerHeight: CGFloat = 52
static let containerHeight: CGFloat = 49
private var containerInsets = UIEdgeInsets(top: 20, left: 24, bottom: 24, right: 24)
private var container: UIView = {
@ -43,13 +43,15 @@ class TabBar: UITabBar {
let stack = UIStackView()
stack.axis = .horizontal
stack.distribution = .fillEqually
stack.alignment = .fill
stack.spacing = 0
return stack
}()
private lazy var bgView: UIView = {
let view = UIView()
view.backgroundColor = .c.csdn
// view.backgroundColor = .c.csdn
view.backgroundColor = .clear // clear
return view
}()
@ -70,7 +72,17 @@ class TabBar: UITabBar {
barTintColor = .clear
}
backgroundColor = .c.cbd
// backgroundColor = .c.cbd
backgroundColor = .clear
let bgImgView = UIImageView(image: R.image.tabbar_bg_img())
bgImgView.contentMode = .scaleToFill
bgImgView.clipsToBounds = true
addSubview(bgImgView)
bgImgView.snp.makeConstraints { make in
make.top.left.right.equalToSuperview()
}
addSubview(bgView)
bgView.addSubview(container)
@ -84,11 +96,9 @@ class TabBar: UITabBar {
let bottom = safeAreaInsets.bottom > 0 ? safeAreaInsets.bottom : containerInsets.bottom
container.snp.makeConstraints { make in
make.left.equalToSuperview().offset(16)//(containerInsets.left)
make.right.equalToSuperview().offset(-16)//(-containerInsets.right)
make.height.equalTo(TabBar.containerHeight)
make.left.right.equalToSuperview()
make.bottom.equalToSuperview().offset(-bottom)
make.bottom.equalToSuperview()
}
containerStack.snp.makeConstraints { make in