Kibernetik
Kibernetik

Reputation: 3028

Is it possible to disable Swift documentation in Xcode?

I am not using Swift, so I don't need its documentation in Xcode. Currently it just messes with Objective C documentation.

Is it possible to disable Swift section of documentation in Xcode?

Upvotes: 17

Views: 1405

Answers (3)

pointum
pointum

Reputation: 3177

The documentation is just a set of HTML files. If it's downloaded, you can edit a CSS file to completely hide Swift or Objective-C code.

  1. Open Documentation window.
  2. Select "Editor" > "Share" > "Open in Browser" menu.
  3. Copy the corresponding part of the address of the page that opens up:

/Users/XXX/Library/Developer/Shared/Documentation/DocSets/com.apple.adc.documentation.XXX.docset/Contents/Resources/Documents/

  1. Switch to Finder, and use "Go" > "Go to Folder" menu to open up the folder.

  2. Browse to Resources/XXXX/CSS folder and edit "xcode5.css" file. You should add either of these blocks to hide Swift or Objective-C:

div .Swift {
    display: none !important;
}
div .Objective-C {
    display: none !important;
}
  1. Restart Xcode and enjoy reduced clutter.

Upvotes: 4

Rob Napier
Rob Napier

Reputation: 299275

I highly recommend Dash to address this and several other weaknesses in the Xcode doc browser. The current Mac Store version doesn't handle it quite right yet, but when the current beta (2.2) is approved, it'll let you choose which languages to display just as you suggest.

Upvotes: 5

matt
matt

Reputation: 534950

It is not possible, and the idea of making it possible would be an excellent enhancement request in a bug report to Apple.

Upvotes: 3

Related Questions