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

plex: 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 bbbf992d
......@@ -20,11 +20,10 @@
#import "NSString+SupportedMedia.h"
#import "VLCStatusLabel.h"
#import "VLCAlertView.h"
#import "UIBarButtonItem+Theme.h"
@interface VLCLocalPlexFolderListViewController () <UITableViewDataSource, UITableViewDelegate, VLCLocalNetworkListCell, UISearchBarDelegate, UISearchDisplayDelegate>
{
UIBarButtonItem *_backButton;
NSMutableArray *_mutableObjectList;
NSCache *_imageCache;
......@@ -38,6 +37,7 @@
UISearchBar *_searchBar;
UISearchDisplayController *_searchDisplayController;
UIRefreshControl *_refreshControl;
UIBarButtonItem *_menuButton;
}
@end
......@@ -123,6 +123,9 @@
[_refreshControl addTarget:self action:@selector(handleRefresh) forControlEvents:UIControlEventValueChanged];
[self.tableView addSubview:_refreshControl];
_menuButton = [UIBarButtonItem themedRevealMenuButtonWithTarget:self andSelector:@selector(menuButtonAction:)];
self.navigationItem.rightBarButtonItem = _menuButton;
_searchData = [[NSMutableArray alloc] init];
[_searchData removeAllObjects];
}
......@@ -135,6 +138,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