导航返回按钮替换和取出返回按钮文字 - iOS
作者:
HAKA | 来源:发表于
2017-06-21 17:27 被阅读24次backButton更换图片 backbutton图片尺寸的话 42*42
写法一:
[self.navigationBar setBackIndicatorImage:[UIImage imageNamed:@"Nav_Back"]];
[self.navigationBar setBackIndicatorTransitionMaskImage:[UIImage imageNamed:@"Nav_Back"]];
写法二:
UIImage *backButtonImage = [[UIImage imageNamed:@"Nav_Back"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
[[UIBarButtonItem appearance] setBackButtonBackgroundImage:backButtonImage forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
去除backButton文字
[[UIBarButtonItem appearance] setBackButtonTitlePositionAdjustment:UIOffsetMake(NSIntegerMin, NSIntegerMin)
forBarMetrics:UIBarMetricsDefault];
本文标题:导航返回按钮替换和取出返回按钮文字 - iOS
本文链接:https://www.haomeiwen.com/subject/vketcxtx.html
网友评论