Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS Build a Playlist Browser with Swift Refactoring Our Code Determining Playlists Programmatically

Heads up for anyone without auto-complettion, a lot of errors and all black code.

Hey guys,

When I started adding Pasan's code from this video I noticed I wasn't getting auto-completion, I was getting a lot of errors and all the new code was black because Xcode wasn't recognizing the new code. As you can imagine I was looking all over the place to find out where I went wrong.

Actually nothing is wrong and you just have to restart Xcode. In the previous video Pasan had us delete various things so I think somewhere along the line Xcode didn't like something. Not necessarily orphans but Xcode needed a cleaning obviously.

As soon as I restarted Xcode saw all my code and everything was nice and colourful again. Good luck.

Joe Susnick
Joe Susnick
5,042 Points

Sometimes cmd-shift-k to clean the build will "fix" some compiler errors. I usually try this before restarting.

1 Answer

Roberta Voulon
Roberta Voulon
5,792 Points

I have been having major code completion issues with Xcode, up to the point of Xcode freezing when I was having too many projects open... for anyone who is having long-term code completion issues, here's what I discovered:

1) Verify that you haven't accidentally toggled it off: Ctrl + Space will toggle it off or on for you.

2) This post on StackOverflow did the trick for me: http://stackoverflow.com/questions/25883905/xcode-6-swift-code-completion-not-working (I had to empty the Derived Data folder and also delete the cache for it to work again -- see instructions)