Reformatting to have method parameters in a new line

In the settings Code-> Style → Objective-C there are so many settings. I am looking for the right option to format this line of code.

SCPropertyDefinition *test = [SCPropertyDefinition definitionWithName:@"created_at" title:@"Tweeted At" type:SCPropertyTypeLabel]; 

into this format

 SCPropertyDefinition *test = [SCPropertyDefinition definitionWithName:@"created_at" title:@"Tweeted At" type:SCPropertyTypeLabel]; 

(the point must match the colonies)

I guess this should be on the Wrapping and Braces Tab, but I haven't found the right setting yet. Thanks for your ideas.

+4
source share
3 answers

The setting you're looking for, Wrapping and Braces | Method call arguments Wrapping and Braces | Method call arguments set to Chop down if long with Align by colon enabled. Note that there are separate settings for Method parameters .

+12
source

It seems that with application code 2017.1 (possibly earlier) the align by colon option is not available in Swift. You can still specify the App Code to slice a long list of arguments / parameters:

How to find a long string slicing dialog

0
source

Is it also possible in Xcode somehow? I could not find anything useful on the Internet or in the settings.

0
source

All Articles