Search results for

swiftui

16,582 results found

Post

Replies

Boosts

Views

Activity

SwiftUI and UIPageViewController
How can I ceate the exact same functionality of the Page-Based application (formally Page-Based template) using SwiftUI to include these features:Portrait view single page turnLandscape view (in iPad) with two page view and page turnHere is an example video showing requested functionality:https://www.youtube.com/watch?v=9cl4slkXqyUSo far, the only examples I have seen in SwiftUI support single page Portrait view.Are there any tutorials that show all functionality supported.Jim
0
0
666
Jan ’20
MetalKit in SwiftUI
Hi,Are there any plans for integrating Metal/MetalKit with SwiftUI?Is that correct that current recommended way of the integration is to use UIViewControllerRepresentable like in the tutorial?Thank you!
18
0
16k
Jul ’19
Game Development in SwiftUI
I want to develop games using swiftUi. I develop games in Unity. Now I want to learn to develop games in SwiftUI. I have few queries: 1: How can we animate objects in SwiftUI? 2: How can we add background? 3: How can we move objects? I will be glad if you answer my queries. I will be waiting for your response. Thanks Muhammad Momin Developer
0
0
681
Oct ’20
autoreleasepools and SwiftUI
I am experimenting with using Swift and SwiftUI for processing genomics data. The hallmark of genomics data is very large data files. Common formats are text files known as fasta and fastq file formats. For the human genome, these files contain more than 40 million lines of text. Being able to write code that can read such large files line by line is essential. After some trial and error and much reading I finally understand Automatic Reference Counting and the importance of using an autoreleasepool to prevent memory from being consumed. I typically read such large files in a background thread and asynchronously update the UI (written in SwiftUI) using DispatchQueue.main.async by setting properties in my ContentView. This works fine. However, as I reach 40 million lines of text, updating the UI consumes memory without releasing it. I have tried to incorporate autoreleasepools in the ContentView using the usual autoreleasepool { ... } syntax. However, within such constructs as VStacks, I enco
1
0
1.3k
Sep ’20
Code coverage in SwiftUI
Even when you separate business logic code from your SwiftUI views the previews and also view bodies seems both to count for the unit test code coverage. I read many articles in the internet about how to test SwiftUI code and archive good code coverage. But they all seem not to be the perfect solution for this task. Is there any good guide for unit and ui testing SwiftUI code that Apple recommends for their apps?
0
0
997
Jun ’22
TextKit 2 and SwiftUI
Is it possible to use/draw a SwiftUI view in TextKit 2? The NSTextLayoutManagerDelegate seems to be built around returning a NSTextLayoutFragment. Since NSTextLayoutFragment is a class, I can't subclass it and use SwiftUI. I'd love to create my views using SwiftUI, since it's a lot faster than figuring out CGPaths, pixel perfect anti-aliasing, etc. Thanks!
0
0
1.2k
Sep ’21