问题
I write code below:
let array1: [Int] = [0,1]
let array2 = array1 + [2]
It just works.I want to find where + operator define. I search ArrayExtension in my workspace without result.I search Apple doc Collection Sequence Array , there is no result.
Is there a way to navigate to operator definition ,like CMD + CTRL + J for func
回答1:
You can select the operator in the Xcode source editor, and choose "Navigate -> Jump to definition" from the menu, or press CMD+CTRL+J.
(This was broken in Xcode 10, but works again in Xcode 11, which is currently in beta.)
来源:https://stackoverflow.com/questions/53651936/how-can-i-find-the-operator-definition-in-swift