In Xcode, if you are calling a method that takes a series of flags as an argument, when you type the right bracket character, it creates a new left bracket at the last flag, rather than at the start of the line. Is there any way to fix this?
// Type this...
someFunc withFlags:FlagA|FlagB|FlagC
// Now type a right bracket ]
someFunc withFlags:FlagA|FlagB|[FlagC ]
// It should be this:
[someFunc withFlags:FlagA|FlagB|FlagC]
Turn-On Xcode->Preferences->TextEditing->Editing->Automatically balance brackets in ObjectiveC method calls
I'm using Xcode Version 5.0.2 (5A3005). The below both of them worked fine for me.It automatically created left bracket when I closed the right one.
[self someFunc:1 Flag:YES|YES|YES];
[self someFunc:YES|YES|YES];
- (void)someFunc:(int)x Flag:(BOOL)yes
{
}
- (void)someFunc:(BOOL)yes
{
}
Here is my Xcode settings
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With