Commit d6ff5422 authored by Felix Paul Kühne's avatar Felix Paul Kühne

Dropbox: add button to go up in the folder hierachy to the parent folder

parent 03267b6a
......@@ -44,6 +44,10 @@
UIBarButtonItem *addButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"BUTTON_DONE", @"") style:UIBarButtonItemStyleDone target:self action:@selector(dismiss:)];
self.navigationItem.rightBarButtonItem = addButton;
UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle:@".." style:UIBarButtonItemStyleBordered target:self action:@selector(folderUp:)];
self.navigationItem.leftBarButtonItem = backButton;
self.navigationItem.titleView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"dropbox-white"]];
self.tableView.rowHeight = [VLCDropboxTableViewCell heightOfCell];
......@@ -60,6 +64,12 @@
[self.navigationController dismissModalViewControllerAnimated:YES];
}
- (IBAction)folderUp:(id)sender
{
_currentPath = [_currentPath stringByDeletingLastPathComponent];
[_dropboxController requestDirectoryListingAtPath:_currentPath];
}
#pragma mark - Table view data source
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment