Is there a command in Xcode 4.2 to swap two views in Assistant Editor mode from left to right and vice versa?

前端 未结 5 2049
情深已故
情深已故 2021-01-31 08:08

I would like to quickly swap two views from one side to the other and wonder if there is a hotkey for this functionality?

5条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-31 08:39

    There is a very easy way to do this. In the assistant editor, there is a bar at the top that shows the path of the file in the editor. Drag that file's icon into the same bar in the main editor.

    Boom! swapped.

    Keep in mind, that you need to be set up this way to pull this off:

    • Have the "Assistant Editor" selected
    • The Assistant Editor needs to be set to Automatic or "Counterparts" for the swap to work.

    Here are the keyboard shortcuts to do the swap:

    ctrl + command + up

    or

    ctrl + command + down

提交回复
热议问题