我想要自定义导航栏后退按钮标题并进行操作。
我的图片:
我需要像这样的后退按钮。在这里,我成功添加了文本,但没有后退箭头。在这里,我的代码对后退按钮有作用。
这是我的代码
classroom.main(int a, int b, int c, int d)
答案 0 :(得分:0)
df1 <- structure(list(id = c("ABCDEFG", "ABCDEFG", "ABCDEFG", "HIJKLMN",
"HIJKLMN", "HIJKLMN", "HIJKLMN", "HIJKLMN"), Date = c("1999-02",
"1999-01", "1998-12", "2019-08", "2019-07", "2019-06", "2019-05",
"2019-04"), MonVariable = 1:8, ReportMonth = c(NA, NA, NA, NA,
NA, NA, "2019-05", "2018-05"), AnnVariable = c(NA, NA, NA, NA,
NA, NA, "100", "90")), row.names = c(NA, -8L), class = "data.frame")
更新
如果需要后退按钮的自定义操作,则必须添加自定义BarButtonItem。而且,如果我们需要后退按钮外观与内置后退按钮相同,则可以创建自定义视图并将其用作酒吧按钮项
func backButtonConfiguration(_ title : String, backImageName : String) {
let backImage : UIImage = UIImage(named: backImageName)!
self.navigationBar.backIndicatorImage = backImage.withRenderingMode(.alwaysTemplate)
self.navigationBar.backIndicatorTransitionMaskImage = backImage
self.navigationBar.backItem?.title = title
}