Customize NavigationBar in IOS Objective c Application
<p>I want my navigation bar like this.</p>

<p><a href="https://i.stack.imgur.com/WiYIO.png" rel="nofollow"><img src="https://i.stack.imgur.com/WiYIO.png" alt="Bar"></a></p>

<p>I am able to set left buttons by below code:</p>

<pre><code>-(void) setNavigationButtons:(NSString *)title{
    UIImage *logoImage = [UIImage imageNamed:@"back-icon"];
    UIButton *logoBackButton = [UIButton buttonWithType:UIButtonTypeCustom];
    [logoBackButton setImage:logoImage forState:UIControlStateNormal];
    logoBackButton.frame = CGRectMake(0.0, 0.0, 50, 50);
    UIBarButtonItem *backBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:logoBackButton];
    [logoBackButton addTarget:self action:@selector(backAction:) forControlEvents:UIControlEventTouchDown];
    [self.navigationController.navigationBar setTitleTextAttributes:
 @{NSForegroundColorAttributeName:[Constants Instance].whiteColor}];
    self.navigationController.navigationBar.barTintColor = [Constants Instance].navigationTitleColor;
    [self setNavigationTitle:title];
    self.navigationItem.leftBarButtonItem = backBarButtonItem;
}

-(void)setNavigationTitle:(NSString *)title{
    self.navigationItem.title = title;
    [self.navigationController.navigationBar setTitleTextAttributes:
    @{NSForegroundColorAttributeName:[UIColor whiteColor],
    NSFontAttributeName:[UIFont fontWithName:@"Nexa Light" size:20]}];
}

- (IBAction)backAction:(id)sender {
    [self.navigationController popViewControllerAnimated:YES];
}
</code></pre>

<p>But it is not attached to left side and have margin. I want it fixed on left side like in in above screenshot. I don't want to show any text like back etc on that button.</p>

<p>Similar is happening with right button.</p>

<p><strong>Edit</strong>
This is the result: 
<a href="https://i.stack.imgur.com/q79gu.png" rel="nofollow"><img src="https://i.stack.imgur.com/q79gu.png" alt="enter image description here"></a></p>

<p>I have faced some more issues not if I add this line at the end of that code.</p>

<pre><code>self.navigationItem.rightBarButtonItem = backBarButtonItem;
</code></pre>

<p>For showing right button also then it shows only right button but not left. Mean I cannot sett both buttons at same time.</p>