-
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: - Added possibility to customise DefaultCameraView (#33) - Added option to change camera frame rate (#28) - Extended ability to customise behaviour after media capture (#34) - Added ability to change camera resolution fix: - Fixed problem with package manager (#29)
- Loading branch information
1 parent
010eeed
commit 0ff7c42
Showing
13 changed files
with
160 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// | ||
// PostCameraConfig.swift of MijickCameraView | ||
// | ||
// Created by Tomasz Kurylik | ||
// - Twitter: https://twitter.com/tkurylik | ||
// - Mail: [email protected] | ||
// - GitHub: https://github.com/FulcrumOne | ||
// | ||
// Copyright ©2024 Mijick. Licensed under MIT License. | ||
|
||
|
||
public class PostCameraConfig { | ||
// MARK: Attributes | ||
var shouldReturnToCameraView: Bool = false | ||
var shouldCloseCameraController: Bool = false | ||
|
||
// MARK: Actions | ||
var customAction: () -> () = {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// | ||
// Public+DefaultCameraView.swift of MijickCameraView | ||
// | ||
// Created by Tomasz Kurylik | ||
// - Twitter: https://twitter.com/tkurylik | ||
// - Mail: [email protected] | ||
// - GitHub: https://github.com/FulcrumOne | ||
// | ||
// Copyright ©2024 Mijick. Licensed under MIT License. | ||
|
||
|
||
import SwiftUI | ||
|
||
// MARK: - Initialiser | ||
public extension DefaultCameraView { | ||
init(cameraManager: CameraManager, namespace: Namespace.ID, closeControllerAction: @escaping () -> Void) { | ||
self.init(cameraManager: cameraManager, namespace: namespace, closeControllerAction: closeControllerAction, config: .init()) | ||
} | ||
} | ||
|
||
// MARK: - Customising View | ||
public extension DefaultCameraView { | ||
func outputTypePickerVisible(_ value: Bool) -> Self { setAndReturnSelf { $0.config.outputTypePickerVisible = value } } | ||
func torchButtonVisible(_ value: Bool) -> Self { setAndReturnSelf { $0.config.torchButtonVisible = value } } | ||
func captureButtonVisible(_ value: Bool) -> Self { setAndReturnSelf { $0.config.captureButtonVisible = value } } | ||
func cameraPositionButtonVisible(_ value: Bool) -> Self { setAndReturnSelf { $0.config.changeCameraButtonVisible = value } } | ||
func gridButtonVisible(_ value: Bool) -> Self { setAndReturnSelf { $0.config.gridButtonVisible = value } } | ||
func flipButtonVisible(_ value: Bool) -> Self { setAndReturnSelf { $0.config.flipButtonVisible = value } } | ||
func flashButtonVisible(_ value: Bool) -> Self { setAndReturnSelf { $0.config.flashButtonVisible = value } } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// | ||
// Public+PostCameraConfig.swift of MijickCameraView | ||
// | ||
// Created by Tomasz Kurylik | ||
// - Twitter: https://twitter.com/tkurylik | ||
// - Mail: [email protected] | ||
// - GitHub: https://github.com/FulcrumOne | ||
// | ||
// Copyright ©2024 Mijick. Licensed under MIT License. | ||
|
||
|
||
extension PostCameraConfig { | ||
public func returnToCameraView(_ value: Bool) -> Self { shouldReturnToCameraView = value; return self } | ||
public func closeCameraController(_ value: Bool) -> Self { shouldCloseCameraController = value; return self } | ||
public func custom(_ action: @escaping () -> ()) -> Self { customAction = action; return self } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters