Post

Replies

Boosts

Views

Activity

Reply to storing AVAsset in SwiftData
I'm curious what experience others have had using .externalStorage to store videos, particularly quite large videos between 250mb to 500mb. Is there a substantial difference between using .externalStorage vs. using CKAsset directly. Are there other approaches when considering large AVAssets?
Topic: Media Technologies SubTopic: Audio Tags:
Jun ’25
Reply to Share via Context Menu Button
It appears that the ShareLink can be added, alongside other buttons, within the .contextMenu as below. .contextMenu { Button(action: { debugPrint("Share") }) { Label("Share", systemImage: "square.and.arrow.up") } ShareLink(item: image, preview: SharePreview("image", image: image)) { Label("Share", systemImage: "square.and.arrow.up") } }
Topic: UI Frameworks SubTopic: SwiftUI
Dec ’24
Reply to Best Way to Support Different Devices in SwiftUI?
Using ViewThatFits is definitely the recommended approach to getting a user interface that adapts to different devices and also different device orientations (e.g. landscape vs. portrait). As with many other aspects of Swift and SwiftUI, ViewThatFits takes a little time to get used to. The first view within ViewThatFits should be the largest view with progressively smaller views coming next. Use the in: parameter to specify whether the view should assess the size horizontally or vertically, as this example shows: ViewThatFits will choose the first child view that fits. While it can be used without the in: parameter, it usually doesn’t provide the required result unless it’s specified. ViewThatFits(in: .horizontal) { HStack { // Large View } HStack { // Medium View } HStack { // Small View } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Dec ’24