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 Using a Navigation Controller With Segues Passing Information Between Views

Alexander Hipp
Alexander Hipp
4,200 Points

Is the command + = different with a German keyboard? Thanks

The keyboard shortcut seems to be different. Can't find a proper solution in the web

Nick Kohrn
Nick Kohrn
36,935 Points

Alexander,

What are you trying to do? Are you trying to get the frame of a UILabel to match it's content's size?

2 Answers

Nick Kohrn
Nick Kohrn
36,935 Points

Alexander,

If you have a UILabel selected in Interface Builder, head up to the Editor menu and see what shortcut is set for Size to Fit Content.

Xcode Editor menu

If there is nothing set there, or if you would like to change the shortcut, then head to the Xcode menu, and then click on Preferences (typical shortcut is ⌘, which is Command and comma). Once in Preferences, select Key Binding at the top of the window. The, in the search bar on the right, type "size to fit content", which should show you the shortcut that is set for that action. You can then double-click on the setting and type in the shortcut of your choice.

Key Bindings menu

Also, note the Conflicts tab to the left of the search bar. You may want to check there to see if something is overriding your default shortcut for Size to Fit Content which is ⌘= (Command and equal sign).

Hope this helps you, Alexander!

Alexander Hipp
Alexander Hipp
4,200 Points

Hi Nick,

yes exactly thats what I am trying to do.

eberhapa
eberhapa
51,495 Points

Did you find the problem? Also not working for me