I have a lot of confusion regarding the Clang Formats API.
- I cannot open the .clangformat file so that I can examine it and configure it according to me.
- I need to format my code in Allman style.
- I saw a lot of google documentation and stack overflows, but I didn't get any help to achieve Allman style formatting.
I stumbled upon http://clangformat.com/ , but also did not get any help to achieve Allman style.
Here is the problem and the solution I want.
ISSUE No. 1:
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(captureSearchFiltersNotificationWithSelection:) name:kSearchFiltersNotificationWithSelection object:nil];
NEED # 1:
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(captureSearchFiltersNotificationWithSelection:)name:kSearchFiltersNotificationWithSelection object:nil];
ISSUE No. 2:
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; if (self) { // listings = [NSMutableArray new]; self.navTitle = @"Buy"; searchFilters = [SearchFilter new]; if ([LocationManager locationManager].location == nil) { selectedSortOption = kSortBuyRefineOptionUndefined; } else { selectedSortOption = kSortBuyRefineOptionNearMeAsc; } } return self; }
NEED # 2:
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle*)nibBundleOrNil { self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; if (self) { listings = [NSMutableArray new]; self.navTitle = @"Buy"; searchFilters = [SearchFilter new]; if ([LocationManager locationManager].location == nil) { selectedSortOption = kSortBuyRefineOptionUndefined; } else { selectedSortOption = kSortBuyRefineOptionNearMeAsc; } } return self; }
source share