iOS 11 backBarButtonItem重复

时间:2017-09-26 03:26:19

标签: navigationbar ios11

enter image description here

在我们在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;`

0 个答案:

没有答案