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

Code refactoring

parent 088a4b0e
......@@ -16,7 +16,7 @@
@interface VLCPlaylistViewController : UIViewController <UITabBarDelegate, UIPopoverControllerDelegate>
@property (nonatomic, strong) VLCMovieViewController *movieViewController;
@property (nonatomic, strong) VLCMenuViewController *addMediaViewController;
@property (nonatomic, strong) VLCMenuViewController *menuViewController;
@property (nonatomic, strong) UIPopoverController *addMediaPopoverController;
@property (nonatomic, strong) UITableView *tableView;
......
......@@ -259,13 +259,13 @@
- (IBAction)leftButtonAction:(id)sender
{
if (self.addMediaViewController == nil)
self.addMediaViewController = [[VLCMenuViewController alloc] initWithNibName:@"VLCAddMediaViewController" bundle:nil];
if (self.menuViewController == nil)
self.menuViewController = [[VLCMenuViewController alloc] initWithNibName:@"VLCMenuViewController" bundle:nil];
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
self.addMediaViewController.contentSizeForViewInPopover = self.addMediaViewController.view.frame.size;
self.menuViewController.contentSizeForViewInPopover = self.menuViewController.view.frame.size;
if (self.addMediaPopoverController == nil) {
self.addMediaPopoverController = [[UIPopoverController alloc] initWithContentViewController:self.addMediaViewController];
self.addMediaPopoverController = [[UIPopoverController alloc] initWithContentViewController:self.menuViewController];
self.addMediaPopoverController.delegate = self;
}
......@@ -276,7 +276,7 @@
permittedArrowDirections:UIPopoverArrowDirectionUp
animated:YES];
} else
[self.navigationController presentViewController:self.addMediaViewController animated:YES completion:NULL];
[self.navigationController presentViewController:self.menuViewController animated:YES completion:NULL];
}
/* deprecated in iOS 6 */
......
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