Create a custom left back button on UINavigationBar WITH the standard arrow on the left

后端 未结 6 1600
情书的邮戳
情书的邮戳 2021-02-05 03:27

When I create a custom back button, I use the following code:

    UIBarButtonItem *leftButton = [[UIBarButtonItem alloc]initWithTitle:@\"Yeah\" style:UIBarButton         


        
6条回答
  •  臣服心动
    2021-02-05 03:59

    I use code like:

    UIBarButtonItem *leftBar = [[UIBarButtonItem alloc] init];
    leftBar.title = @"Back";//Details
    self.navigationController.navigationBar.topItem.backBarButtonItem = leftBar;
    

提交回复
热议问题