Question: I have a view which pushes a new view onto the screen.

When the new view is shown, there is no back button in the navigation controller.

I have the following in one view

![enter image description here](https://i.stack.imgur.com/cC3dK.png)

and I push a new view using the following code

```
[photoViewController setAsset:[assets objectAtIndex:(cell.rowNumber * 4) + index]];
[[self navigationController] pushViewController:photoViewController animated:YES];
[photoViewController release];

```

When the view appears the following is visible

![enter image description here](https://i.stack.imgur.com/nt9dW.png)

How do I add the back button and where would I add the same share button to the bar in the second view?

Thanks. :)

Answer: 
You need to set a title in your first view. The back button uses the title of the previous view. If one is not set then the back button will not be displayed.

In the viewDidLoad method of your first view, use self.title = @"title";
U should not set backButton on VIewDidLoad, instead u code it on DidSelect

```
 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {

    UIBarButtonItem *btn=[[UIBarButtonItem alloc]init];
btn.title=@"Back";
self.navigationItem.backBarButtonItem=btn;
[btn release];

  }

```