Code Formatting In Xcode

前端 未结 12 1868
名媛妹妹
名媛妹妹 2020-12-09 02:01

Is there anyway to format the code in Xcode like you can do in Eclipse or Netbenas. I have not found any option in menu, is there any hot key for this or its simply not in X

12条回答
  •  悲&欢浪女
    2020-12-09 02:38

    Here are the shortcuts, to format the code in Xcode

    1.Format entire code (entire class/controller)

    select the entire code and press +| on mac to format your code.

    2.Format particular block of code

    select the code and press

    +] for right move and +[ for left move

    Note : as per @JavierGiovannini sugesstion you can do using Editor Menu option

    3.Select code --> Go to Editor --> Structure --> Re-Indent

提交回复
热议问题