UIButton *button = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 40, 40)];
[button setImage:[UIImage imageNamed:@"goback"] forState:UIControlStateNormal];
[button addTarget:self action:@selector(backBarButtonPressed:) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithCustomView:button];
if(@available(iOS 11.0, *)) {
[[button.heightAnchor constraintEqualToConstant:40] setActive:YES];
[[button.widthAnchor constraintEqualToConstant:40] setActive:YES];
}
self.navigationItem.leftBarButtonItem = backButton;