I have a lot of confusion regarding Clang Format API.
- I am not able to open .clangformat file so that I can take a look into that and configure according to me.
- I need to format my code in Allman style.
- I have seen lots of documentation on Google and Stack Overflow as well but I didn't get any help to achieve Allman style formatting.
I came across http://clangformat.com/ but there also I didn't get any help to achieve Allman style.
Here is the issue and the solution I want.
ISSUE #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 #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;
}
.clang-format
or_clang-format
and placed in the project directory. – Gyron