Commit 2025b7d1 authored by Pierre SAGASPE's avatar Pierre SAGASPE Committed by Felix Paul Kühne
Browse files

local network: add access to side menu with menu button at left in navigation bar


Signed-off-by: Felix Paul Kühne's avatarFelix Paul Kühne <fkuehne@videolan.org>
parent 332c698f
......@@ -25,6 +25,7 @@
#import "NSString+SupportedMedia.h"
#import "VLCStatusLabel.h"
#import "BasicUPnPDevice+VLC.h"
#import "UIBarButtonItem+Theme.h"
#define kVLCServerTypeUPNP 0
#define kVLCServerTypeFTP 1
......@@ -32,7 +33,7 @@
@interface VLCLocalServerFolderListViewController () <UITableViewDataSource, UITableViewDelegate, WRRequestDelegate, VLCLocalNetworkListCell, UISearchBarDelegate, UISearchDisplayDelegate, UIActionSheetDelegate>
{
/* UI */
UIBarButtonItem *_backButton;
UIBarButtonItem *_menuButton;
/* generic data storage */
NSString *_listTitle;
......@@ -166,6 +167,9 @@
[tapTwiceGesture setNumberOfTapsRequired:2];
[self.navigationController.navigationBar addGestureRecognizer:tapTwiceGesture];
_menuButton = [UIBarButtonItem themedRevealMenuButtonWithTarget:self andSelector:@selector(menuButtonAction:)];
self.navigationItem.rightBarButtonItem = _menuButton;
_searchData = [[NSMutableArray alloc] init];
[_searchData removeAllObjects];
}
......@@ -178,6 +182,14 @@
return YES;
}
- (IBAction)menuButtonAction:(id)sender
{
[[(VLCAppDelegate*)[UIApplication sharedApplication].delegate revealController] toggleSidebar:![(VLCAppDelegate*)[UIApplication sharedApplication].delegate revealController].sidebarShowing duration:kGHRevealSidebarDefaultAnimationDuration];
if (self.isEditing)
[self setEditing:NO animated:YES];
}
#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