Permalink
Browse files

Fix for Issue #9

  • Loading branch information...
1 parent 3becf88 commit 1a63d51ee67c2b625f910b8dfe52bf4fd4ccf765 Greg Haines committed Dec 5, 2012
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -9,15 +9,7 @@
#import <Foundation/Foundation.h>
@class GHRevealViewController;
-@interface GHMenuViewController : UIViewController <UITableViewDataSource, UITableViewDelegate> {
-@private
- GHRevealViewController *_sidebarVC;
- UISearchBar *_searchBar;
- UITableView *_menuTableView;
- NSArray *_headers;
- NSArray *_controllers;
- NSArray *_cellInfos;
-}
+@interface GHMenuViewController : UIViewController <UITableViewDataSource, UITableViewDelegate>
- (id)initWithSidebarViewController:(GHRevealViewController *)sidebarVC
withSearchBar:(UISearchBar *)searchBar
@@ -14,7 +14,14 @@
#pragma mark -
#pragma mark Implementation
-@implementation GHMenuViewController
+@implementation GHMenuViewController {
+ GHRevealViewController *_sidebarVC;
+ UISearchBar *_searchBar;
+ UITableView *_menuTableView;
+ NSArray *_headers;
+ NSArray *_controllers;
+ NSArray *_cellInfos;
+}
#pragma mark Memory Management
- (id)initWithSidebarViewController:(GHRevealViewController *)sidebarVC
@@ -51,12 +58,12 @@ - (void)viewDidLoad {
_menuTableView.backgroundColor = [UIColor clearColor];
_menuTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
[self.view addSubview:_menuTableView];
+ [self selectRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0] animated:NO scrollPosition:UITableViewScrollPositionTop];
}
- (void)viewWillAppear:(BOOL)animated {
self.view.frame = CGRectMake(0.0f, 0.0f,kGHRevealSidebarWidth, CGRectGetHeight(self.view.bounds));
[_searchBar sizeToFit];
- [self selectRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0] animated:NO scrollPosition:UITableViewScrollPositionTop];
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)orientation {
@@ -7,6 +7,7 @@
objects = {
/* Begin PBXBuildFile section */
+ 372EED28166FE3B60067C395 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 372EED27166FE3B60067C395 /* Default-568h@2x.png */; };
6B014F5214B3DAC4001E922B /* GHMenuViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B014F5114B3DAC4001E922B /* GHMenuViewController.m */; };
6B014F5714B41DB6001E922B /* GHSidebarSearchViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B014F5614B41DB6001E922B /* GHSidebarSearchViewController.m */; };
6B0CAC0114BD064800394B5D /* searchBarIcon.png in Resources */ = {isa = PBXBuildFile; fileRef = 6B0CABFE14BD064800394B5D /* searchBarIcon.png */; };
@@ -28,6 +29,7 @@
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
+ 372EED27166FE3B60067C395 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = "<group>"; };
6B014F5014B3DAC4001E922B /* GHMenuViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GHMenuViewController.h; path = Demo/GHMenuViewController.h; sourceTree = SOURCE_ROOT; };
6B014F5114B3DAC4001E922B /* GHMenuViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GHMenuViewController.m; path = Demo/GHMenuViewController.m; sourceTree = SOURCE_ROOT; };
6B014F5514B41DB6001E922B /* GHSidebarSearchViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GHSidebarSearchViewController.h; sourceTree = "<group>"; };
@@ -114,6 +116,7 @@
6BE3FC99147A096400CDEC04 = {
isa = PBXGroup;
children = (
+ 372EED27166FE3B60067C395 /* Default-568h@2x.png */,
6B74312915C23F4B00474C2E /* Utils */,
6BE3FCAE147A096500CDEC04 /* GHSidebarNav */,
6BBA75B914872E10004E1A5E /* Demo */,
@@ -235,6 +238,7 @@
6B0CAC0114BD064800394B5D /* searchBarIcon.png in Resources */,
6B0CAC0214BD064800394B5D /* searchBarIcon@2x.png in Resources */,
6B0CAC0314BD064800394B5D /* searchTextBG.png in Resources */,
+ 372EED28166FE3B60067C395 /* Default-568h@2x.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};

0 comments on commit 1a63d51

Please sign in to comment.