Posts

Post not yet marked as solved
4 Replies
2k Views
I created a new macOS document-based app in Xcode Version 11.5 (11E608c), and modified ContentView to look like this: struct ContentView: View { var body: some View { ZStack { Circle() .foregroundColor(.red) .frame(width: 30, height: 30, alignment: .center) Text("Hello, World!") } .frame(maxWidth: .infinity, maxHeight: .infinity) } } I made no other changes other than to enable the print capability. The canvas and app itself look just as you'd expect. When I run File->Print, however, only the window, its frame, and the text show up in the print preview and on the printed page. The circle graphic is missing, even though the appropriate light/dark mode background is there. Is this a bug, or is there something else required to enable graphics to print from SwiftUI?
Posted
by feldur.
Last updated
.
Post not yet marked as solved
0 Replies
222 Views
Quick help (option-click) works fine on Xcode13 RC when examining library functions, but does nothing for local variables and functions / methods. Do I mis-understand what's expected of quick help? It makes no difference if I have documentation (cmd-option-/) for the element or not.
Posted
by feldur.
Last updated
.
Post not yet marked as solved
0 Replies
329 Views
I've build a form with a list of items. It's nested in a NavigationView with an EditButton, and works properly in preview. It needs to live nested via a NavigationLink in another view, however, and when previewed (or run in the simulator) that way the edit button causes a reaction that looks like a new view animating in, but that view is not editable.Why would this be? I've seen some material that uses the term edit scope, but I don't see what that is nor how it's controlled.Thanks
Posted
by feldur.
Last updated
.
Post not yet marked as solved
4 Replies
1.5k Views
I've been developing a macOS app using a storyboard that defines a main window with toolbar and splitview. It's written in Swift 3 (I have not migrated to Swift 4 yet.) The splitview has a pane for graphics and another for a text log; both scroll. I have view controllers for all three; the two subsidiary scenes are ited to the split view with relationships. This worked up until today when I installed Xcode 9 beta 4. (Yes, I have beta 3 in the trash at the moment and can revert)Upon cleaning the build folder and compiling, I get the error `NSSplitViewController's 'view' outlet should not point to its NSSplitView; use the 'splitView' outlet instead However, the NSSplitViewController subclass has no outlets defined; its two children arrange to tell it of their existence in their viewDidLoad methods. Moreover, I don't seem to be able to create an outlet between that window and its controller. I now also note that the split drawn in the split view controller's scene is horizontal instead of vertical as it had been. I don't see a way to change that. (I can't run the app, so I don't know if it matters. I suspect it does.)The net result is that I can't see what the error is trying to tell me. The error prevents the application from building and running, whereas with beta 3 it worked. I'm hoping someone can explain what Xcode is telling me and how to fix it.
Posted
by feldur.
Last updated
.