问题
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