bengardner/uncrustify — Issue #46: Objective-C blocks gaining spurious spaces
Author: tonyarnold
Created: 2011-11-18 04:39:52+00:00
State: open

I'm not sure if this is the same issue as #22 (it looks similar), but I'm seeing some odd behaviour around formatting Objective-C blocks:

```objective-c
typedef void (^ CancelBlock)();
typedef void (^ PhotoPickedBlock)(NSDictionary *chosenItemDetails);
```

Should be:

```objective-c
typedef void (^CancelBlock)();
typedef void (^PhotoPickedBlock)(NSDictionary *chosenItemDetails);
```

And then when it is used in the header (`.h`):

```objective-c
+ (void)imagePickerWithTitle:(NSString *)title showInView:(UIView *)view presentVC:(UIViewController *)presentView onPhotoPicked:(PhotoPickedBlock) photoPicked onCancel:(CancelBlock)cancelled;
```

Should be:

```objective-c
+ (void)imagePickerWithTitle:(NSString *)title showInView:(UIView *)view presentVC:(UIViewController *)presentView onPhotoPicked:(PhotoPickedBlock)photoPicked onCancel:(CancelBlock)cancelled;
```

Oddly, it only seems to affect the first declaration, and the implementation (`.m`) file is unaffected by this problem.