Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

点击图片预览时,无法修改预览页顶部导航栏的背景色 #689

Closed
835932621 opened this issue May 12, 2024 · 1 comment
Closed

Comments

@835932621
Copy link

   let style: UIModalPresentationStyle = .fullScreen
    var config = HXPhotoPicker.PhotoBrowser.Configuration()
    config.showDelete = true
    config.modalPresentationStyle = style
    config.tintColor = .black
    
    let cell = collectionView.cellForItem(at: indexPath) as? ResultViewCell
    HXPhotoPicker.PhotoBrowser.show(
        // 预览的资源数组
        selectedAssets ?? [],
        // 当前预览的位置
        pageIndex: indexPath.item,
        // 预览相关配置
        config: config,
        // 转场动画初始的 UIImage
        transitionalImage: cell?.photoView.image
    ) { index, _ in
        // 转场过渡时起始/结束时 对应的 UIView
        self.collectionView.cellForItem(
            at: IndexPath(
                item: index,
                section: 0
            )
        ) as? ResultViewCell
    } deleteAssetHandler: { index, photoAsset, photoBrowser in
        // 点击了删除按钮
        PhotoTools.showAlert(
            viewController: photoBrowser,
            title: "是否删除当前资源",
            leftActionTitle: "确定",
            leftHandler: { (alertAction) in
                photoBrowser.deleteCurrentPreviewPhotoAsset()
                self.previewDidDeleteAsset(
                    index: index
                )
            }, rightActionTitle: "取消") { (alertAction) in }
    } longPressHandler: { index, photoAsset, photoBrowser in
        if photoAsset.mediaSubType == .localLivePhoto ||
            photoAsset.mediaSubType == .livePhoto {
            return
        }
        print("未添加长按响应事件")
    }

导航栏上的关闭跟删除字体颜色可修改,背景色无法修改,请问应该修改那个配置才可以改掉这个背景色啊
Uploading Simulator Screenshot - iPhone 15 Pro Max - 2024-05-12 at 14.12.08.png…

@835932621
Copy link
Author

Uploading Simulator Screenshot - iPhone 15 Pro Max - 2024-05-12 at 14.12.08.png…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant