Is it possible to disable Swift documentation in Xcode?

后端 未结 3 573
孤街浪徒
孤街浪徒 2021-02-13 02:39

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 do

相关标签:
3条回答
  • 2021-02-13 02:58

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

    0 讨论(0)
  • 2021-02-13 03:10

    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.
    0 讨论(0)
  • 2021-02-13 03:12

    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.

    0 讨论(0)
提交回复
热议问题