Quickly view the type of a Swift variable in XCode

隐身守侯 提交于 2019-12-10 16:15:13

问题


Is there any shortcut that will allow me to quickly view the type of any variable in Swift in XCode? Alt-Click returns "No Quick Help". Type inference is awesome, but makes life hard without tools such as these...


回答1:


Either use Alt-click to display the declaration of the variable which displays the type at the top right like so:

Or use autocompletion to show you the type:



来源:https://stackoverflow.com/questions/26493199/quickly-view-the-type-of-a-swift-variable-in-xcode

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!