Xcode 8: custom description in suggestion

2019-05-11 11:12发布

问题:

I'm trying to have custom description for my functions shown in the suggestions box which shows up as I type said function names, the same way it works for swift functions: e.g the UIActivityIndicatorView.startAnimating() description is shown both in the QuickHelp menu AND in the completion box

in Xcode 7 I would just add a comment line with the /** */ tags prior to the function declaration and the ide would recognize it accordingly e.g.

but for some reason doing so with Xcode 8 only shows the custom description within the QuickHelp tab of the Utilities menu, and not in the suggestion box. Is there any suggestion about how I may obtain the same behavior with this new version of Xcode? I would appreciate it a lot!

回答1:

Hear i found some solution. You need to change User Header Search Path No to Yes under Build settings. And then restart your xcode.

This is working fine for me.



回答2:

It is because of Indexing.... just go to your project name at the top of navigation and Clean (cmd+shift+k) then come again to the file where you wanna work type any word you will see suggestion popUp. that it..

Other way is that just quit your xcode and open it again and wait for a moment let xcode indexing the files then type any word you will see suggestion popUp. that it..