You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Sources/MediaSwiftUI/API/LivePhoto/LivePhoto+SwiftUI.swift
+39-12Lines changed: 39 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,7 @@
6
6
//
7
7
8
8
#if canImport(SwiftUI)
9
+
import Combine
9
10
import MediaCore
10
11
import PhotosUI
11
12
import SwiftUI
@@ -50,41 +51,67 @@ public extension LivePhoto {
50
51
/// Creates a ready-to-use `SwiftUI` view for browsing `LivePhoto`s in the photo library
51
52
/// If an error occurs during initialization a `SwiftUI.Text` with the `localizedDescription` is shown.
52
53
///
54
+
/// - Parameter isPresented: A binding to whether the underlying picker is presented.
53
55
/// - Parameter selectionLimit: Specifies the number of items which can be selected. Works only on iOS 14 and macOS 11 where the `PHPicker` is used under the hood. Defaults to `1`.
54
56
/// - Parameter completion: A closure which gets the selected `LivePhoto` on `success` or `Error` on `failure`.
/// Creates a ready-to-use `SwiftUI` view for browsing `LivePhoto`s in the photo library
62
64
/// If an error occurs during initialization the provided `errorView` closure is used to construct the view to be displayed.
63
65
///
66
+
/// - Parameter isPresented: A binding to whether the underlying picker is presented.
64
67
/// - Parameter selectionLimit: Specifies the number of items which can be selected. Works only on iOS 14 and macOS 11 where the `PHPicker` is used under the hood. Defaults to `1`.
65
68
/// - Parameter errorView: A closure that constructs an error view for the given error.
66
69
/// - Parameter completion: A closure which gets the selected `LivePhoto` on `success` or `Error` on `failure`.
0 commit comments