
想要去除这个“返回”的文字,可以这样:
[[UIBarButtonItem appearance] setBackButtonTitlePositionAdjustment:UIOffsetMake(NSIntegerMin, NSIntegerMin)
forBarMetrics:UIBarMetricsDefault];

但是这样做在iOS9以上会有问题,后台返回会跳屏

找到了另外的方法,这样:
[[UIBarButtonItem appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor clearColor]}
forState:UIControlStateNormal];
[[UIBarButtonItem appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor clearColor]}
forState:UIControlStateHighlighted];
网友评论