What I tried was, add an image to UIBarButtonItem and set that UIBarButtonItem as the default backBarButtonItem.
Below is my code;
UIImage *backNavImg = [[UIImage imageNamed:@"backward_navigation_arrow"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
UIBarButtonItem *backBtnItem = [[UIBarButtonItem alloc] initWithImage:backNavImg style:UIBarButtonItemStylePlain target:self action:nil];
self.navigationItem.backBarButtonItem = backBtnItem;
The issue is, there is considerable space between that back bar button item and left margin. I have highlighted it from Red colour on the image.
I want to decrease that gap from programmatically. How can I achieve that.
I tried below code, but nothing happened.
[backBtnItem setImageInsets:UIEdgeInsetsMake(0, 0, 0, 0)];