Posts

Post marked as Apple Recommended
0 Views
Nankea, while you have a good point regarding the extension of unowned types, DocC still doesn't generate documentation for the extensions.
Post not yet marked as solved
4 Replies
0 Views
The multicast publisher uses value semantics, while the share publisher uses reference semantics, which allows more than subscriber to share the output of the publisher. Otherwise, all the publishers would need to execute for each subscriber, which might be wasteful, depending on the application.
Post not yet marked as solved
5 Replies
0 Views
I'm playing with this arrangment. Turns out I don't need two RoundedRectangle shapes. It seems by default the RoundedRectangle is not filled with any color, and hence it is essentially clear.
Post not yet marked as solved
4 Replies
0 Views
The cleanest solution to this problem is to define a view modifier. For example:struct ClearButton: ViewModifier { @Binding var text: String public func body(content: Content) -> some View { HStack { content Button(action: { self.text = "" }) { Image(systemName: "multiply.circle.fill") .foregroundColor(.secondary) } } } }The following demonstrates use of this view modifier:struct ClearButton: ViewModifier { @Binding var text: String public func body(content: Content) -> some View { HStack { content Button(action: { self.text = "" }) { Image(systemName: "multiply.circle.fill") .foregroundColor(.secondary) } } } }
Post not yet marked as solved
3 Replies
0 Views
Someone from the Swift Forums pointed me to the Catalina release notes. I find it strange that it shows up there and not in the Xcode release notes. The developer documentation packaged with Xcode beta 4 only deprecates APIs, it does not specify any new APIs. However, the online developer documentation shows the deprecated APIs and the new APIs.
Post marked as solved
2 Replies
0 Views
Thanks for your reply. I started this thread on the Swift Forums:https://forums.swift.org/t/viewing-synthesized-code/14560?u=patrick_giliWhile the replies somewhat provide some useful information, none provide an efficient means of viewing and validating code synthesized by the compiler. This might require putting together a proposal and submitting it.
Post not yet marked as solved
12 Replies
0 Views
Hi Eskimo,I included a copy of the code in the unit test bundle. I did enable Show Test Bundles, but no joy.To make progress, I created a Cocoa project and copied the code into it. Xcode seems to behave properly for Cocoa projects, both in the editor and the coverage.reporter.I have submitted bug report 39138509.One thing that is odd. When creating a project to illustrate the problem, I accidentally forgot to add the test target to the test scheme. Doing this, I was able to individually execute tests and coverage seemed to work as expected. However, as soon as I added the test target to the test scheme, coverage stopped working.Cheers,-Patrick