Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maintenance: Remove non needed ivars and properties in iPhone MasterVC #1217

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions XBMC Remote/MasterViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,33 +12,15 @@
#import "CustomNavigationController.h"
#import "MessagesView.h"

@class DetailViewController;
@class NowPlaying;
@class RemoteController;
@class HostManagementViewController;
@class AppInfoViewController;
@class HostManagementViewController;

@interface MasterViewController : UIViewController <UITableViewDataSource, UITableViewDelegate> {
IBOutlet UITableView *menuList;
UIButton *xbmcInfo;
UIButton *xbmcLogo;
UIButton *powerButton;
NSDictionary *checkServerParams;
NSIndexPath *storeServerSelection;
AppInfoViewController *appInfoView;
HostManagementViewController *hostManagementViewController;
BOOL itemIsActive;
CustomNavigationController *navController;
UIImageView *globalConnectionStatus;
MessagesView *messagesView;
}

@property (nonatomic, strong) NSMutableArray *mainMenu;
@property (strong, nonatomic) DetailViewController *detailViewController;
@property (strong, nonatomic) NowPlaying *nowPlaying;
@property (strong, nonatomic) RemoteController *remoteController;
@property (strong, nonatomic) HostManagementViewController *hostController;
@property (strong, nonatomic) tcpJSONRPC *tcpJSONRPCconnection;

@end
38 changes: 21 additions & 17 deletions XBMC Remote/MasterViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ @interface MasterViewController () {

@implementation MasterViewController

@synthesize detailViewController = _detailViewController;
@synthesize nowPlaying = _nowPlaying;
@synthesize remoteController = _remoteController;
@synthesize hostController = _hostController;
@synthesize mainMenu;
@synthesize tcpJSONRPCconnection;

Expand Down Expand Up @@ -153,27 +149,36 @@ - (void)tableView:(UITableView*)tableView didSelectRowAtIndexPath:(NSIndexPath*)
BOOL hideBottonLine = NO;
switch (item.family) {
case FamilyNowPlaying:
self.nowPlaying = [[NowPlaying alloc] initWithNibName:@"NowPlaying" bundle:nil];
self.nowPlaying.detailItem = item;
object = self.nowPlaying;
{
NowPlaying *nowPlayingController = [[NowPlaying alloc] initWithNibName:@"NowPlaying" bundle:nil];
nowPlayingController.detailItem = item;
object = nowPlayingController;
break;
}
case FamilyRemote:
[self.remoteController resetRemote];
self.remoteController = [[RemoteController alloc] initWithNibName:@"RemoteController" withEmbedded:NO bundle:nil];
self.remoteController.detailItem = item;
object = self.remoteController;
{
RemoteController *remoteController = [[RemoteController alloc] initWithNibName:@"RemoteController" withEmbedded:NO bundle:nil];
remoteController.detailItem = item;
object = remoteController;
break;
}
case FamilyServer:
self.hostController = [[HostManagementViewController alloc] initWithNibName:@"HostManagementViewController" bundle:nil];
object = self.hostController;
{
HostManagementViewController *hostController = [[HostManagementViewController alloc] initWithNibName:@"HostManagementViewController" bundle:nil];
object = hostController;
hideBottonLine = YES;
break;
}
case FamilyDetailView:
self.detailViewController = [[DetailViewController alloc] initWithNibName:@"DetailViewController" bundle:nil];
self.detailViewController.detailItem = item;
object = self.detailViewController;
{
DetailViewController *detailViewController = [[DetailViewController alloc] initWithNibName:@"DetailViewController" bundle:nil];
detailViewController.detailItem = item;
object = detailViewController;
hideBottonLine = YES;
break;
}
default:
break;
}
navController = [[CustomNavigationController alloc] initWithRootViewController:object];
navController.navigationBar.barStyle = UIBarStyleBlack;
Expand Down Expand Up @@ -341,7 +346,6 @@ - (void)viewDidLoad {
XBMCVirtualKeyboard *virtualKeyboard = [[XBMCVirtualKeyboard alloc] initWithFrame:CGRectMake(0, 0, 1, 1)];
[self.view addSubview:virtualKeyboard];
AppDelegate.instance.obj = [GlobalData getInstance];
checkServerParams = @{@"properties": @[@"version", @"volume"]};
menuList.scrollsToTop = NO;

// Add connection status icon to root view
Expand Down
1 change: 0 additions & 1 deletion XBMC Remote/RemoteController.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ typedef NS_ENUM(NSInteger, RemotePositionType) {

- (IBAction)startVibrate:(id)sender;
- (void)setEmbeddedView;
- (void)resetRemote;
- (id)initWithNibName:(NSString*)nibNameOrNil withEmbedded:(BOOL)withEmbedded bundle:(NSBundle*)nibBundleOrNil;
@property (strong, nonatomic) id detailItem;
@property (nonatomic, strong) NSTimer *holdKeyTimer;
Expand Down