Xcode Views and Modifiers Buttons Missing from Library Panel

@Chris_Parker, any idea what wizardry @Chris2 is using in the video to access the Views and Modifiers buttons with no Views in the code block?

@christopherplain
Can you provide the time stamp in the video lesson that you saw this?

@Chris_Parker starting around 8:00 he deletes the selected View and opens the library panel.

I can see what you mean. I certainly can’t replicate that in Xcode 12.5 so maybe the version of Xcode that Chris was using at the time the Lesson was created was an earlier version. :man_shrugging:

Either that or Chris is as wizard! :mage:

Thank you for checking.

I had the same problem. The preview window needs to have focus when the library is opened. Only then will it look like Chris’ in the video.

-J

1 Like

@xy-rn

Jeff,

Welcome to the community.

What version of Xcode are you using?

Hi Chris, thanks for the welcome.

I’m using Xcode 12.5.1 12E507.

However, I can’t seem to replicate that solution - it’s just working as expected now, despite taking me about an hour to solve previously.

-J.

This is not working! It is going to be impossible to learn anything is if the lessons are broken like this!
Can someone please tell me what to do to make it work in Version 12.5.1 (12E507). I was looking forward to start learning and now this :frowning:

@TechBox_North

Not all of the lessons are broken.

Can you provide a screen shot of what you are seeing?

Xcode 12.5.1 works differently than the previous version which unfortunately is what everyone has to deal with over time as the product develops. That includes Chris Ching who is the author of these lessons who is equally frustrated when the rug gets pulled out from under him.

It’s just a fact of life as an IDE (Integrated Development Environment) is constantly refined and updated.

@TechBox_North

Keep in mind that all of the moderators here (including myself) are here to provide assistance when something does not work as expected. Often there is a simple solution that someone else has come up with that will get you to the point of being able to continue. Just hang in there.

Here is the solution I use when I come across this issue, it’s quick and easy!

SOLUTION: when the canvas isn’t shown they also do not show.
go to (Adjust editor options) in the top right hand corner → then click canvas

wallah!
p.s apologies if this solution already exists here but I was to lazy too read through all the comments.

I am having this exact same problem (with same version of XCode 12.5.1 = bad software).

BTW, what YEAR are the comments posted in? 2021? (The dates only show month and day!!!)

This is VERY frustrating. I could not understand kmmarie777’s solution proposal. Where is “Adjust Editor Options” in the “top right hand corner”??? Right hand corner of what???

Here is a screen shot showing the Library panel displaying with the “Show the Views library” little square icon missing, among other things):

They only show the year if it’s not the current year. So if you only see month and day, then the year is the current year.

And you can always see the full date by hovering your mouse over the date. (Which doesn’t help on a mobile device.)

It is very easy to show a standard date format showing the year.

In that way, the end user does not have to guess about the year or know of the convention that the current year is not shown. Realize that many users visit pages like this as a result of a Web search. Showing the year makes it immediately clear to the reader who stumbles upon this page what date the post was made, no guessing or deduction needed.

(I dislike things such as “3d” for similar reasons).

:shrug:

OK

Xcode isn’t bad software, it’s the IDE that’s used to develop iOS (and all of apple’s platform) apps and is constantly changing, like all software. So occasionally things will break.

However the solution to your problem is answered by Chris, and is marked as the solution to this original question. You must have one view in your SwiftUI view for the menu to come up properly like Chris’s videos.

Looking at the picture you posted

You have no view inside of your ContentView’s body property. Add something like Text(“Hello”) inside the body property and then click Cmd + Shift + L

kmmarie777 ‘s proposed solution is about the canvas. Which may not be directly related to your question. However she’s referring to the top right hand corner of Xcode. Clicking the icon, shown here and then clicking on Canvas to show the canvas in Xcode

image

@allard

If you read the entire thread I do make the point, in one of my posts, that the current version of Xcode requires “a View” of some sort within the body property for the library to allow you to select other Views to drag in. That’s the way it now works now so you need to take that on board and move on.

With regard to the timestamps that are provided on the posts 99% of the people using this community forum understand that 3d means 3 days ago, 3h means 3 hours ago. Jul 17 means July 17 just gone. For posts that occur in the previous year (2020) they have a date like Dec 2020.

Everyone here who offers help are volunteers apart from the immediate members of the Code With Chris team and we look forward to assisting members of this community with coding queries. If you have a specific coding query then feel free to create a separate post in the appropriate Category.