What would be the correct way of calling PHPhotoLibrary's presentLimitedLibraryPicker method from SwiftUI? The method requires a UIViewController, which I don't have in SwiftUI. I have tried to use UIViewControllerRepresentable, and it works, but the result is that two View Controllers are presented, the one I create with UIViewControllerRepresentable, and the Limited Library Picker. Thanks a lot in advance!
Search results for
swiftui
16,582 results found
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
How to implement Camera in SwiftUI? Any ideas?
I am trying to debug some odd launch performance on iPad in an app using SwiftUI. I have set breakpoints in the SwiftUI portions of the app as well as in procedural code, but no breakpoints are hit during execution. I have successfully set and observed breakpoints before in SwiftUI, so I suspect I've got some project setting wrong, but I can't see what I'm missing. I'm using Xcode 12.5 on Big Sur on a MacBook Pro. I appreciate any suggestions.
Hi community,I never build a macOS application before and just getting started with Xcode.I'm completely lost on how to implement the touchbar while using SwiftUI.I read and tested the tutorial provided here: https://developer.apple.com/documentation/appkit/touch_bar/creating_and_customizing_the_touch_barBut the code doesn't make sense to me. I played around about 8 hours now and I wasn't even able to make the touchbar show up with a default dummy button. The longer I experimented, the more I had the impression that this all is not SwiftUI, but I really can't tell, because I don't know the difference yet. I just want to learn the new System and don't start with outdated stuff.Indeed, everything I found on the internet, tutoring the touchbar implementation seems to be no SwiftUI. The only thing I found is this ( https://developer.apple.com/documentation/swiftui/touchbar ) and this ( https://stackoverflow.com/questions/59919050/how-can-i-display-touch-bar-buttons-using-swiftui
I'm getting the following crash using my `UIView` subclass with `UIViewRepresentable`:(lldb) bt * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) frame #0: 0x00007fff2c7cd373 SwiftUI`(extension in SwiftUI):__C.NSAttributedString.(MetricsCache in _4EAA3873E044FE8466A2EF8771E1058D).findMetrics(requestedSize: __C.CGSize) -> Swift.Optional<(extension in SwiftUI):__C.NSAttributedString.(Metrics in _4EAA3873E044FE8466A2EF8771E1058D)> + 1059 frame #1: 0x00007fff2c7ca659 SwiftUI`(extension in SwiftUI):__C.NSAttributedString.(MetricsCache in _4EAA3873E044FE8466A2EF8771E1058D).metrics(requestedSize: __C.CGSize) -> (extension in SwiftUI):__C.NSAttributedString.(Metrics in _4EAA3873E044FE8466A2EF8771E1058D) + 297 frame #2: 0x00007fff2c7ca506 SwiftUI`SwiftUI.StyledTextLayoutDelegate.sizeThatFits(SwiftUI._ProposedSize) -> __C.CGSize + 118 frame #3: 0x00007fff2c6c0b89 SwiftUI
Hello, I would like to earn certification in developing iOS applications using SwiftUI. However, at https://developer.apple.com/learn/curriculum/, I have only found certification exams for UIKit. Is there a way to get official certification with SwiftUI as well?
I've been reading the documentation and apparently protocols force structures, classes or enumerations to implement specific methods or define certain variables. I've double checked this functionality by typing the following code. In fact, xcode compiler helped me to verify this since it popped up an alert that depicted the following message : Type MiguelStruc does not conform to protocol Miguels ... protocol Miguels { func someF()-> Float } public struct MiguelStruc{ var miguelVar : String = hey } extension MiguelStruc: Miguels{ } Now, while I was following the official swiftUI drawing paths and shapes tutorial I encountered this particular chain of code: (https://developer.apple.com/tutorials/swiftui/drawing-paths-and-shapes) Path { path in } .fill(.black) By diving into the Swiftui documentation I noticed that Shape is a protocol public protocol Shape : Sendable, Animatable, View which is implemented by the Path structure extension Path : Shape Why none of the Path extensions
I'm considering developing a new multi-platform app and feel SwiftUI this year has become more a lot more potent. However I'm confused between the two sets of technologies being promoted. Should I use SwiftUI's multiplatform option to develop for three different platforms (iOS / iPadOS / macOS) so that I can use the same views more or less but give each their own personality or should I develop for iOS and iPadOS and later Catalyst over to macOS? I feel Catalyst is for older UIKit based apps while SwiftUI is a complete replacement for UIKit+Catalyst. Am I correct to assume that I'll have more control over a SwiftUI multiplatform app and greater flexibility? I would still like to bundle these apps separately on the stores though, not sell them under a single price. What should I choose?
How to implement Sign in with Apple in SwiftUI?
Hello there! Does anyone know how to apply Apple's default fonts to text in SwiftUI?
I believe there is an animation bug at official swiftui tutorial: https://developer.apple.com/tutorials/swiftui/animating-views-and-transitions The last animation does not behave correctly when you switch between different graph even with the 'Complete' project apple provided. Xcode: Version 11.5 (11E608c)
Which talk did Apple introduce the SwiftUI VideoPlayer specifically?
Is there a SwiftUI equivalent for NSBrowser? I tried to create my own with a (horizontal) ScrollView containing an HStack of Lists, but it looks like List's selection can currently only be used for editing mode (i.e. checkmarks) rather than normal mode (i.e. gray backgrounds).
Hello,Does anybody know how to create a splitview in SwiftUI for the iPad?I mean a view like Settings, left the options and right the details.If I use HSplitView(), I got the error: 'HSplitView' is unavailable in iOS.VSplitView() got the same error.Kind Regards,Kitty
Hi all, I can't find anything similar to UIFocusGuide in SwiftUI documentation. Without something similar to UIfocusGuide I don't see how to manage focus on tvOS with complex app ... Is there something that I missed or SwiftUI currently not useful for tvOS production applications?