29 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
1
answer
362
views
How to save images from a Photo Picker to SwiftData
I am having an issue with saving images to SwiftData and I'm not entirely sure of the best way to do so.
I have an EntryModel data model for an individual entry as such:
@Model
class EntryModel {
...
-1
votes
1
answer
929
views
How to use a photo picker and display the selected photo within a single sheet in SwiftUI?
I want to have a sheet that displays a photo picker when the sheet is presented. After selecting a photo, the photo picker should disappear, but the sheet itself should remain open and display the ...
0
votes
0
answers
63
views
How to restrict single photo selection while photo library access permission is displayed and user selects allow access?
In my SwiftUI application user should is allowed select only one photo from photo gallery. When first time application is installed and it asks for App would like to access your photo libary pop up ...
0
votes
0
answers
63
views
Conditionally exclude TransferRepresentation when importing
I have the following TransferRepresentation that, depending on the user settings imports a live photo or a static image:
public static var transferRepresentation: some TransferRepresentation {
...
0
votes
1
answer
77
views
SwiftUI Image display rotates on device
My test app grabs a photo from the device, and then displays it. Simple.
On the simulator, it works great, but on a device, it rotates the image. Sometimes 90 degrees, sometimes 180, sometimes it's ...
1
vote
0
answers
149
views
SwiftData Can't Use PhotosPickerItem as Property
I'm trying to find a way to reference photos in the User Photos Library and add those references in a SwiftData record. I can, of course, get the photos from the library, convert to Data type and ...
0
votes
1
answer
180
views
Is there an image cropping interface in PhotosUI/SwiftUI
I am unable to find a way to show the cropping interface like in WhatsApp when using PhotosUI in SwiftUI.
Eg:
I’m assuming this is the standard UI provided by Apple and not custom made by WhatsApp. ...
1
vote
1
answer
339
views
How to load livephoto from `PhotosPickerItem` with `Transferable`
I can load PHLivephoto with loadTransferable(type: PHLivePhoto.self).
But I could not load livephotos from my own Transferable type. For example, loadTransferable(type: LivephotoTrasferable.self)
in ...
2
votes
1
answer
291
views
How can I disable location information in PHPickerViewController?
I'm using PHPickerViewController to allow a user to import photos into my app. Unfortunately, it seems to default to including location information (see screenshot below, all the way at the bottom). I'...
1
vote
0
answers
188
views
How to load the list of videos available on the ios device in swiftui
I have started to develop an iOS application where i have to load all the videos that is available on the user's device as a list on my application as a label if i click on that it should navigate to ...
-3
votes
1
answer
313
views
Limit PhotosPicker selectable items to only Albums (SwiftUI)
Is there any way to use the PhotosUI PhotosPicker api in SwiftUI, but limit the user to picking only a single album, not individual photos or even multiple individual photos? The ....
2
votes
1
answer
213
views
How to remove PhotosPicker background colour on visionOS?
When using PhotosPicker on visionOS the content has a background color. How do I remove this? I have noticed the same with Stepper.
Example:
Code:
import SwiftUI
import PhotosUI
struct AddImageView: ...
0
votes
2
answers
728
views
How to display PhotosPicker via swiftUI Image LongPressGesture?
I would like to display a PhotosUI PhotosPicker via a longPressGesture of a UIImage.
import SwiftUI
import PhotosUI
@MainActor
final class TestViewModelProfile: ObservableObject {
@Published ...
1
vote
0
answers
159
views
Failed to write video. Status: AVAssetWriterStatus(rawValue: 3), error: The requested URL was not found on this server
I want to make avasset(duration 3.0 sec) from uiimage using swiftui and photosui.
But i got result
Failed to write video. Status: AVAssetWriterStatus(rawValue: 3), error: The requested URL was not ...
0
votes
1
answer
218
views
How to properly update a State var from a separate view in swiftUI
I have a WineInfoView that displays an array of images of a particular wine. The last "image" in the horizontal scroll is a blank image that when tapped on shows the users camera roll and ...