Xcode 8: custom description in suggestion

2019-05-11 11:03发布

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

completion box

quickhelp 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.

enter image description here

custom func

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!

2条回答
对你真心纯属浪费
2楼-- · 2019-05-11 11:34

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..

查看更多
不美不萌又怎样
3楼-- · 2019-05-11 11:51

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.

enter image description here

查看更多
登录 后发表回答