A
A
Anther2020-02-24 17:32:20
Apple Xcode
Anther, 2020-02-24 17:32:20

How to automatically wrap parenthesis in xcode?

How to make it so that after pressing the enter button
it was like this:

for (int n : mas)
{

}


And not like this:
for (int n : mas){

}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Igor Cherny, 2020-02-25
@freeg0r

In general, I do not advise you to do this, format it as in the documentation. When you read poorly/weirdly formatted code, it's hard to focus on the logic, the eye constantly clings to all sorts of extra spaces or their absence in the right place, etc. Personally, it annoys me. If you wrote under C #, where it is customary, you do not need to drag these "traditions" into Swift / ObjectiveC. Swift (like all modern new languages) is built on the principles of conciseness and focus on business logic, and this is helped by standards and conventions. Therefore, if you expect other people to work with your code, treat them with respect, format the code as is customary in this environment.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question