在我们在iOS 11中测试我们的应用程序之前它工作正常.`UIImage * imageNor = [UIImage imageNamed:@“nav_icon_back_nor1”]; UIImage * imagePre = [UIImage imageNamed:@“nav_icon_back_pre1”]; UIBarButtonItem * item = [[UIBarButtonItem alloc] init]; [item setBackButtonBackgroundImage:[imageNor resizableImageWithCapInsets:UIEdgeInsetsMake(0,imageNor.size.width,0,0)] forState:UIControlStateNormal barMetrics:UIBarMetricsDefault]; [item setBackButtonBackgroundImage:[imagePre resizableImageWithCapInsets:UIEdgeInsetsMake(0,imagePre.size.width,0,0)] forState:UIControlStateHighlighted barMetrics:UIBarMetricsDefault]; [item setBackButtonTitlePositionAdjustment:UIOffsetMake(-400.f,0)forBarMetrics:UIBarMetricsDefault]; [item setTitle:@“”];
self.navigationItem.backBarButtonItem = item;`