xcode - organize the code (straighten)?
is there a way to organize the the position of the code (straighten .开发者_开发知识库..) automatically?
Edit menu > Format > Re-indent.
You can select the code and then choose "Reindent selection" from the context menu.
Go to Preferences (⌘+,). Then scroll along the top to the right and click the "Indent" header. There should be an option called something like "Indent text automatically." That should do what you want. :)
精彩评论