Skip to content

Commit

Permalink
Merge pull request #657 from SilenceLove/654-相机按钮样式定制
Browse files Browse the repository at this point in the history
fix:#654
  • Loading branch information
SilenceLove authored Apr 17, 2024
2 parents 820f184 + 32582c1 commit 8437a6f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,14 @@ public struct CameraConfiguration: IndicatorTypeConfig, PhotoHUDConfig {
public var takePhotoMode: TakePhotoMode = .press

/// 主题色
public var tintColor: UIColor = .systemBlue
public var tintColor: UIColor = .systemBlue {
didSet {
focusColor = tintColor
}
}

/// 聚焦框的颜色
public var focusColor: UIColor = .systemBlue

/// 摄像头最大缩放比例
public var videoMaxZoomScale: CGFloat = 6
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class CameraNormalPreviewView: UIView {

focusView = CameraFocusView(
size: CGSize(width: 80, height: 80),
color: config.tintColor
color: config.focusColor
)
focusView.layer.opacity = 0
focusView.isUserInteractionEnabled = false
Expand Down
2 changes: 1 addition & 1 deletion Sources/HXPhotoPicker/Camera/View/CameraPreviewView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class CameraPreviewView: UIView {

focusView = CameraFocusView(
size: CGSize(width: 80, height: 80),
color: config.tintColor
color: config.focusColor
)
focusView.layer.opacity = 0
focusView.isUserInteractionEnabled = false
Expand Down

0 comments on commit 8437a6f

Please sign in to comment.