I have a project with a single asset image. In the dependency package, I am attempting to preview using the image in the project using Bundle.main. I just get a blank.
How can I get this to work?
Sample project here: https://github.com/AaronBratcher/SwiftUIPreviewProblem
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Is it possible to do Swift Data operations on a background processing event?
I want to add SwiftUI to an existing package. Super simple to get started. It previews with Xcode 15.4, but gives an error on Xcode 16.0: JITError: Runtime linking failure
Anyone have an idea on what may be failing?
Full SwiftUI code:
import SwiftUI
struct Dashboard: View {
var body: some View {
Text("hello")
}
}
#Preview {
Dashboard()
}
When using a UIHostingController to host my SwiftUI content, I can't get the navigation title to start large and shift to inline as the user scrolls. Is this a known problem with using the UIHostingController?
var viewModel: DashboardViewModel!
lazy var contentView = UIHostingController(rootView: DashboardView(viewModel: viewModel))
override func viewDidLoad() {
super.viewDidLoad()
addChild(contentView)
view.addSubview(contentView.view)
setupConstraints()
navigationItem.title = "Test Title"
navigationItem.largeTitleDisplayMode = .automatic
}
The title in the navigation controller shows inline
When showing an ImageDownloader actor, the presenter said a solution on avoiding duplicate downloads is shown with the code associated with this video. When will this code be available? I don't see it on the video page.