我正在尝试使用图像创建自定义后退栏按钮项目。我是这样做的:
let image = UIImage(named: "Back")
self.navigationBar.backIndicatorImage = image
self.navigationBar.backIndicatorTransitionMaskImage = UIImage(named: "Back")
self.navigationBar.tintColor = UIColor.blackColor()
如您所见,它应该向下移动一点,向右移动一点。我试图以这种方式为图像添加偏移量:
self.navigationBar.backIndicatorImage = image?.imageWithAlignmentRectInsets(UIEdgeInsetsMake(10, 40, 0, 0))
但它不起作用,同样。有任何想法吗?