Commit c81187a1 authored by Gleb Pinigin's avatar Gleb Pinigin

About code simplification: create view controller if needed

parent 6f066a02
......@@ -35,15 +35,12 @@
- (void)viewWillAppear:(BOOL)animated
{
[self.navigationController setNavigationBarHidden:YES animated:NO];
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
[UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleBlackTranslucent;
[super viewWillAppear:animated];
}
- (void)viewWillDisappear:(BOOL)animated
{
[self.navigationController setNavigationBarHidden:NO animated:YES];
[UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleBlackOpaque;
[super viewWillDisappear:animated];
}
......
......@@ -102,10 +102,8 @@
- (IBAction)openAboutPanel:(id)sender
{
VLCAppDelegate* appDelegate = [UIApplication sharedApplication].delegate;
if (!appDelegate.playlistViewController.aboutViewController)
appDelegate.playlistViewController.aboutViewController = [[VLCAboutViewController alloc] initWithNibName:@"VLCAboutViewController" bundle:nil];
[appDelegate.playlistViewController.navigationController pushViewController:appDelegate.playlistViewController.aboutViewController animated:YES];
UIViewController *aboutController = [[VLCAboutViewController alloc] initWithNibName:@"VLCAboutViewController" bundle:nil];
[appDelegate.playlistViewController.navigationController pushViewController:aboutController animated:YES];
[self _hideAnimated:NO];
}
......
......@@ -10,7 +10,6 @@
#import "AQGridView.h"
@class VLCMovieViewController;
@class VLCAboutViewController;
@class VLCAddMediaViewController;
@interface VLCPlaylistViewController : UIViewController <AQGridViewDataSource, AQGridViewDelegate, UITableViewDataSource, UITableViewDelegate, UITabBarDelegate, UIPopoverControllerDelegate>
......@@ -19,9 +18,7 @@
}
@property (nonatomic, strong) VLCMovieViewController *movieViewController;
@property (nonatomic, strong) VLCAboutViewController *aboutViewController;
@property (nonatomic, strong) VLCAddMediaViewController *addMediaViewController;
@property (nonatomic, strong) UIPopoverController *addMediaPopoverController;
@property (nonatomic, strong) IBOutlet UITableView *tableView;
......
......@@ -10,7 +10,6 @@
#import "VLCMovieViewController.h"
#import "VLCPlaylistTableViewCell.h"
#import "VLCPlaylistGridView.h"
#import "VLCAboutViewController.h"
#import "VLCAddMediaViewController.h"
@interface VLCPlaylistViewController () {
......
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