SwiftUI: The Structured Editing Popover (Command + Click) does not show up - xcode

In SwiftUI tutorial (link) it says to:
Command-click the text view’s initializer to show the structured editing popover, and then choose Embed in VStack
However, it does not work for me.
What is the command for that?
What that deprecated already?

If it helps someone out there, you must have changed Xcode shortcut preferences to go to "Definition" on "Command Click".
So now for seeing the structured editing popover, use "Control Command Click".

Seems to be an Xcode quirk caused by having the canvas hidden. Bring the preview canvas back on screen and the Command + Click functionality returns to normal:
I've seen similar weirdness with two Xcode windows open… especially if one window is hiding the Preview.
Another quirk mentioned above: the Library picker is missing the Views and Modifiers tab sometimes. Again, open the Preview Canvas and the Library will snap back to normal. You might also have to bring focus to the canvas (i.e. click on something there).

Close and reopen Xcode should help. Like code completion sometimes is not working the popover also sometimes stuck.

I found that command + Left Click on Text (within the .swift file) took me to the definition of Text, however command + Right Click caused the menu containing "everything" to appear, from which I was then able to select "Show in UISwift inspector".
I couldn't get anything to popup in the Canvas.
Using Xcode 12.2 on macOS 11.0.1

According to Apple's release notes for the latest Xcode 11 beta release, the inspector and preview features don't currently work without MacOS Catalina 10.15 (the current stable/public release is MacOS 10.14.6 at the time of posting).
You'll either need to wait until the publicly released version of Mac OS 10.15 or gain access to a beta version of MacOS to use these.
Source (Apple | Xcode 11 Release notes):
Xcode 11 supports development with SwiftUI. (22843503)
Note: SwiftUI previews and inspectors are only available when running on macOS Catalina 10.15.

Restart the project for 1 or 2 times and CMD+B(Build) your project one the start.

Related

New file screen misaligned in Xcode

I am using Xcode7.3.1.When i click File-> New->File option from Xcode menu and i choose Cocoa Touch Class then a screen appear like the following screen.Its not aligned properly.I think this appear after installing Xcode8 on my Mac.This issue also appeared in Xcode8.Please go through following screen.How to solve this issue?

Xcode [8] Editor scrolls on its own?

EnvironmentXcode 8MacOS 10.11.6MacBook Air (circa 2013)
ProblemI've noticed recently that the Editor in Xcode seems to periodically scroll-up on its own. Which I, at least, find very annoying.
I've looked at a couple of other postings:
Xcode scrolls text while typing
XCode auto-scroll when pressing Command after a text selectionBut neither of them seem to provide a solution for me, as I'm not pressing the Command key and I'm not using multiple fingers on the touch-pad.
It seems to happen most frequently when I'm working on code near the bottom of the file, I haven't been able to narrow down the cause-and-effect scenario more than that just yet.
Query
Has anyone else noticed this?
Has anyone figured out a way to stop it?
Is there a reasonable way to report this to Apple? There doesn't seem to be an Xcode section on the http://www.apple.com/feedback/ site.
Try to disable your XCode theme if you have one. We ended up with that bug by doing this trick!
For XCode 10.1 changing the font size to 12 for the selected theme did the trick.

missing alignment guides in xcode interface builder

I am new to programming on the Apple Mac. I have followed a programming guide supplied in the Mac Developer Library to program a basic GUI program called TrackMix. In this program you place a textbox, a vertical slider and a button control on the view window. Initially, on dragging the specific object, say the textbox, to the window, a set of alignment guides (dotted blue lines) would automatically appear on the canvas when the object is dragged over it. I dont know what has happened, but now those guides have disappeared when I execute the same action of dragging objects to the window. When the object being dragged is over the window a small green dot, with a plus sign in it, appears on the bottom of the object. I have carefully retraced my steps to be exactly the same as stated in the Developer Library, but still the problem persist. Have I, perhaps, involuntarily changed some Xcode settings or what? I am at the end of my wits! PS: I am using Xcode 7.
You have to toggle the menu item "Editor > Canvas > Snap To Guides" in Storyboard. I hope that helps
I am not sure whether this will be helpful, but I just had the same problem and the only thing which worked was re-installing Xcode (7.3) and trashing all of the Xcode preferences.
Good luck.

I see absolutely nothing under Size Inspector in Interface Builder. I want to be able to set the Auto

I see no settings at all under Size Inspector in Interface Builder, it is completely blank for my View, all labels and all buttons. I am using xcode 4.6 and have 'Use Autolayout' unchecked and the metrics (Size, Status Bar, Top Bar, Bottom Bar) are all 'None'. I need to be able to control the autoresizingmask, but why can't I see any size properties?
Once you switch to Size Inspector tab, directly under the icon there is a little header that says "View." If you hover over that some text appears that says "Show," because apparently that section can collapse down. Clicking the header should cause the options you expect to appear.
I wish they would make this more clear, because I completely missed it as well, and restarted Xcode several times.
I ran into this problem using Xcode 5.0 but upon further investigation, discovered the dysfunction ran to a higher degree - all Inspector views in Xcode were blank for every control, and the Navigator buttons didn't work either.
The culprit seems to have been a conflict in versioning. When I re-checked out trunk, Xcode returned to expected behavior.
Resizing the Xcode window made things right again for me - go figure.
This worked for me......
Clear Menu -> Recent Files
i cleared last open storyboard from Recent files
Restart Xcode

How can I change Xcode 4.4.1's 3-finger multitouch select action within an editor?

Xcode 4.2 used to toggle between the header file and the .m file when you swiped up/down with 3 fingers in an editor window. Now excode 4.4.1 turns it into a text selection. Is there a way to change the default behavior to something else (in my case back to toggling between .h/.m)?
I got the 3 finger swipe working in Xcode 4.4 (I'm running Mountain Lion). It is possible. Try following these instructions: https://stackoverflow.com/a/7923619/472344.
I had already used these to get the 3 finger swipe working in Xcode 4.3 when I updated to Lion. It seemed to break when I updated to Xcode 4.4 and Mountain Lion. I went through all the steps again, but this time all the settings were already set correctly so I didn't have to change anything. However, now it's working for me. Give it a shot.
You can also switch between the .h and .m by using ctrl+command+UpArrow (or DownArrow).
I don't know if there is a way to change the gesture within Xcode, but usually i find if i open .h first, then .m (or the other way around) then you can swipe between them with 2 fingers right or left :)
As long as you open them in the centre and not in a new window =]

Resources