How to change text on a back button

前端 未结 20 2052
无人及你
无人及你 2020-11-29 17:24

By default the back button uses as a text on it a title of a viewcontroller. Can I change text on the back button without changing a title of a view controller? I need this

20条回答
  •  無奈伤痛
    2020-11-29 17:58

    This one worked for me if you don't want to have a title!

    self.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@" " style:UIBarButtonItemStylePlain target:nil action:nil];
    

提交回复
热议问题