Skip to content

Commit

Permalink
Working version
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanoa committed Aug 15, 2012
1 parent cc118b2 commit 14b5e21
Show file tree
Hide file tree
Showing 29 changed files with 765 additions and 59 deletions.
109 changes: 103 additions & 6 deletions SASlideMenu.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,24 @@
7B8C3FEB15D8D55800E42A41 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 7B8C3FEA15D8D55800E42A41 /* main.m */; };
7B8C3FEF15D8D55800E42A41 /* SASlideMenuAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7B8C3FEE15D8D55800E42A41 /* SASlideMenuAppDelegate.m */; };
7B8C3FF215D8D55800E42A41 /* MainStoryboard.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 7B8C3FF015D8D55800E42A41 /* MainStoryboard.storyboard */; };
7B8C3FF515D8D55800E42A41 /* SASlideMenuViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7B8C3FF415D8D55800E42A41 /* SASlideMenuViewController.m */; };
7B8C3FF515D8D55800E42A41 /* ExampleMenuViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7B8C3FF415D8D55800E42A41 /* ExampleMenuViewController.m */; };
7B8C400715D8D72900E42A41 /* SASlideMenuInitialSegue.m in Sources */ = {isa = PBXBuildFile; fileRef = 7B8C3FFD15D8D72900E42A41 /* SASlideMenuInitialSegue.m */; };
7B8C400815D8D72900E42A41 /* SASlideMenuCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 7B8C3FFF15D8D72900E42A41 /* SASlideMenuCell.m */; };
7B8C400915D8D72900E42A41 /* SASlideMenuItemViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7B8C400215D8D72900E42A41 /* SASlideMenuItemViewController.m */; };
7B8C400A15D8D72900E42A41 /* SASlideMenuStoryboardSegue.m in Sources */ = {isa = PBXBuildFile; fileRef = 7B8C400415D8D72900E42A41 /* SASlideMenuStoryboardSegue.m */; };
7B8C400B15D8D72900E42A41 /* SASlideMenuViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7B8C400615D8D72900E42A41 /* SASlideMenuViewController.m */; };
7B8C401915D8E75300E42A41 /* disclosure.png in Resources */ = {isa = PBXBuildFile; fileRef = 7B8C400D15D8E75300E42A41 /* disclosure.png */; };
7B8C401A15D8E75300E42A41 /* disclosure@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7B8C400E15D8E75300E42A41 /* disclosure@2x.png */; };
7B8C401B15D8E75300E42A41 /* menu.png in Resources */ = {isa = PBXBuildFile; fileRef = 7B8C400F15D8E75300E42A41 /* menu.png */; };
7B8C401C15D8E75300E42A41 /* menu@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7B8C401015D8E75300E42A41 /* menu@2x.png */; };
7B8C401D15D8E75300E42A41 /* menuhighlighted.png in Resources */ = {isa = PBXBuildFile; fileRef = 7B8C401115D8E75300E42A41 /* menuhighlighted.png */; };
7B8C401E15D8E75300E42A41 /* menuhighlighted@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7B8C401215D8E75300E42A41 /* menuhighlighted@2x.png */; };
7B8C401F15D8E75300E42A41 /* menuicon.png in Resources */ = {isa = PBXBuildFile; fileRef = 7B8C401315D8E75300E42A41 /* menuicon.png */; };
7B8C402015D8E75300E42A41 /* menuicon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7B8C401415D8E75300E42A41 /* menuicon@2x.png */; };
7B8C402115D8E75300E42A41 /* row.png in Resources */ = {isa = PBXBuildFile; fileRef = 7B8C401515D8E75300E42A41 /* row.png */; };
7B8C402215D8E75300E42A41 /* row@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7B8C401615D8E75300E42A41 /* row@2x.png */; };
7B8C402315D8E75300E42A41 /* rowselected.png in Resources */ = {isa = PBXBuildFile; fileRef = 7B8C401715D8E75300E42A41 /* rowselected.png */; };
7B8C402415D8E75300E42A41 /* rowselected@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7B8C401815D8E75300E42A41 /* rowselected@2x.png */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand All @@ -29,8 +46,31 @@
7B8C3FED15D8D55800E42A41 /* SASlideMenuAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SASlideMenuAppDelegate.h; sourceTree = "<group>"; };
7B8C3FEE15D8D55800E42A41 /* SASlideMenuAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SASlideMenuAppDelegate.m; sourceTree = "<group>"; };
7B8C3FF115D8D55800E42A41 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = en.lproj/MainStoryboard.storyboard; sourceTree = "<group>"; };
7B8C3FF315D8D55800E42A41 /* SASlideMenuViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SASlideMenuViewController.h; sourceTree = "<group>"; };
7B8C3FF415D8D55800E42A41 /* SASlideMenuViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SASlideMenuViewController.m; sourceTree = "<group>"; };
7B8C3FF315D8D55800E42A41 /* ExampleMenuViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ExampleMenuViewController.h; sourceTree = "<group>"; };
7B8C3FF415D8D55800E42A41 /* ExampleMenuViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ExampleMenuViewController.m; sourceTree = "<group>"; };
7B8C3FFC15D8D72900E42A41 /* SASlideMenuInitialSegue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SASlideMenuInitialSegue.h; sourceTree = "<group>"; };
7B8C3FFD15D8D72900E42A41 /* SASlideMenuInitialSegue.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SASlideMenuInitialSegue.m; sourceTree = "<group>"; };
7B8C3FFE15D8D72900E42A41 /* SASlideMenuCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SASlideMenuCell.h; sourceTree = "<group>"; };
7B8C3FFF15D8D72900E42A41 /* SASlideMenuCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SASlideMenuCell.m; sourceTree = "<group>"; };
7B8C400015D8D72900E42A41 /* SASlideMenuDataSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SASlideMenuDataSource.h; sourceTree = "<group>"; };
7B8C400115D8D72900E42A41 /* SASlideMenuItemViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SASlideMenuItemViewController.h; sourceTree = "<group>"; };
7B8C400215D8D72900E42A41 /* SASlideMenuItemViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SASlideMenuItemViewController.m; sourceTree = "<group>"; };
7B8C400315D8D72900E42A41 /* SASlideMenuStoryboardSegue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SASlideMenuStoryboardSegue.h; sourceTree = "<group>"; };
7B8C400415D8D72900E42A41 /* SASlideMenuStoryboardSegue.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SASlideMenuStoryboardSegue.m; sourceTree = "<group>"; };
7B8C400515D8D72900E42A41 /* SASlideMenuViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SASlideMenuViewController.h; sourceTree = "<group>"; };
7B8C400615D8D72900E42A41 /* SASlideMenuViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SASlideMenuViewController.m; sourceTree = "<group>"; };
7B8C400D15D8E75300E42A41 /* disclosure.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = disclosure.png; sourceTree = "<group>"; };
7B8C400E15D8E75300E42A41 /* disclosure@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "disclosure@2x.png"; sourceTree = "<group>"; };
7B8C400F15D8E75300E42A41 /* menu.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = menu.png; sourceTree = "<group>"; };
7B8C401015D8E75300E42A41 /* menu@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "menu@2x.png"; sourceTree = "<group>"; };
7B8C401115D8E75300E42A41 /* menuhighlighted.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = menuhighlighted.png; sourceTree = "<group>"; };
7B8C401215D8E75300E42A41 /* menuhighlighted@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "menuhighlighted@2x.png"; sourceTree = "<group>"; };
7B8C401315D8E75300E42A41 /* menuicon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = menuicon.png; sourceTree = "<group>"; };
7B8C401415D8E75300E42A41 /* menuicon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "menuicon@2x.png"; sourceTree = "<group>"; };
7B8C401515D8E75300E42A41 /* row.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = row.png; sourceTree = "<group>"; };
7B8C401615D8E75300E42A41 /* row@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "row@2x.png"; sourceTree = "<group>"; };
7B8C401715D8E75300E42A41 /* rowselected.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = rowselected.png; sourceTree = "<group>"; };
7B8C401815D8E75300E42A41 /* rowselected@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "rowselected@2x.png"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -77,11 +117,12 @@
7B8C3FE415D8D55800E42A41 /* SASlideMenu */ = {
isa = PBXGroup;
children = (
7B8C3FFB15D8D61500E42A41 /* SASlideMenu */,
7B8C3FED15D8D55800E42A41 /* SASlideMenuAppDelegate.h */,
7B8C3FEE15D8D55800E42A41 /* SASlideMenuAppDelegate.m */,
7B8C3FF315D8D55800E42A41 /* ExampleMenuViewController.h */,
7B8C3FF415D8D55800E42A41 /* ExampleMenuViewController.m */,
7B8C3FF015D8D55800E42A41 /* MainStoryboard.storyboard */,
7B8C3FF315D8D55800E42A41 /* SASlideMenuViewController.h */,
7B8C3FF415D8D55800E42A41 /* SASlideMenuViewController.m */,
7B8C3FE515D8D55800E42A41 /* Supporting Files */,
);
path = SASlideMenu;
Expand All @@ -98,6 +139,44 @@
name = "Supporting Files";
sourceTree = "<group>";
};
7B8C3FFB15D8D61500E42A41 /* SASlideMenu */ = {
isa = PBXGroup;
children = (
7B8C400C15D8E70200E42A41 /* Images */,
7B8C3FFC15D8D72900E42A41 /* SASlideMenuInitialSegue.h */,
7B8C3FFD15D8D72900E42A41 /* SASlideMenuInitialSegue.m */,
7B8C3FFE15D8D72900E42A41 /* SASlideMenuCell.h */,
7B8C3FFF15D8D72900E42A41 /* SASlideMenuCell.m */,
7B8C400015D8D72900E42A41 /* SASlideMenuDataSource.h */,
7B8C400115D8D72900E42A41 /* SASlideMenuItemViewController.h */,
7B8C400215D8D72900E42A41 /* SASlideMenuItemViewController.m */,
7B8C400315D8D72900E42A41 /* SASlideMenuStoryboardSegue.h */,
7B8C400415D8D72900E42A41 /* SASlideMenuStoryboardSegue.m */,
7B8C400515D8D72900E42A41 /* SASlideMenuViewController.h */,
7B8C400615D8D72900E42A41 /* SASlideMenuViewController.m */,
);
path = SASlideMenu;
sourceTree = "<group>";
};
7B8C400C15D8E70200E42A41 /* Images */ = {
isa = PBXGroup;
children = (
7B8C400D15D8E75300E42A41 /* disclosure.png */,
7B8C400E15D8E75300E42A41 /* disclosure@2x.png */,
7B8C400F15D8E75300E42A41 /* menu.png */,
7B8C401015D8E75300E42A41 /* menu@2x.png */,
7B8C401115D8E75300E42A41 /* menuhighlighted.png */,
7B8C401215D8E75300E42A41 /* menuhighlighted@2x.png */,
7B8C401315D8E75300E42A41 /* menuicon.png */,
7B8C401415D8E75300E42A41 /* menuicon@2x.png */,
7B8C401515D8E75300E42A41 /* row.png */,
7B8C401615D8E75300E42A41 /* row@2x.png */,
7B8C401715D8E75300E42A41 /* rowselected.png */,
7B8C401815D8E75300E42A41 /* rowselected@2x.png */,
);
path = Images;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand Down Expand Up @@ -152,6 +231,18 @@
files = (
7B8C3FE915D8D55800E42A41 /* InfoPlist.strings in Resources */,
7B8C3FF215D8D55800E42A41 /* MainStoryboard.storyboard in Resources */,
7B8C401915D8E75300E42A41 /* disclosure.png in Resources */,
7B8C401A15D8E75300E42A41 /* disclosure@2x.png in Resources */,
7B8C401B15D8E75300E42A41 /* menu.png in Resources */,
7B8C401C15D8E75300E42A41 /* menu@2x.png in Resources */,
7B8C401D15D8E75300E42A41 /* menuhighlighted.png in Resources */,
7B8C401E15D8E75300E42A41 /* menuhighlighted@2x.png in Resources */,
7B8C401F15D8E75300E42A41 /* menuicon.png in Resources */,
7B8C402015D8E75300E42A41 /* menuicon@2x.png in Resources */,
7B8C402115D8E75300E42A41 /* row.png in Resources */,
7B8C402215D8E75300E42A41 /* row@2x.png in Resources */,
7B8C402315D8E75300E42A41 /* rowselected.png in Resources */,
7B8C402415D8E75300E42A41 /* rowselected@2x.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -164,7 +255,12 @@
files = (
7B8C3FEB15D8D55800E42A41 /* main.m in Sources */,
7B8C3FEF15D8D55800E42A41 /* SASlideMenuAppDelegate.m in Sources */,
7B8C3FF515D8D55800E42A41 /* SASlideMenuViewController.m in Sources */,
7B8C3FF515D8D55800E42A41 /* ExampleMenuViewController.m in Sources */,
7B8C400715D8D72900E42A41 /* SASlideMenuInitialSegue.m in Sources */,
7B8C400815D8D72900E42A41 /* SASlideMenuCell.m in Sources */,
7B8C400915D8D72900E42A41 /* SASlideMenuItemViewController.m in Sources */,
7B8C400A15D8D72900E42A41 /* SASlideMenuStoryboardSegue.m in Sources */,
7B8C400B15D8D72900E42A41 /* SASlideMenuViewController.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -280,6 +376,7 @@
7B8C3FFA15D8D55800E42A41 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
Expand Down
14 changes: 14 additions & 0 deletions SASlideMenu/ExampleMenuViewController.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//
// ExampleMenuViewController.h
// SASlideMenu
//
// Created by Stefano Antonelli on 8/13/12.
// Copyright (c) 2012 Stefano Antonelli. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "SASlideMenuViewController.h"
#import "SASlideMenuDataSource.h"
@interface ExampleMenuViewController :SASlideMenuViewController<SASlideMenuDataSource>

@end
57 changes: 57 additions & 0 deletions SASlideMenu/ExampleMenuViewController.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
//
// ExampleMenuViewController.m
// SASlideMenu
//
// Created by Stefano Antonelli on 8/13/12.
// Copyright (c) 2012 Stefano Antonelli. All rights reserved.
//

#import "ExampleMenuViewController.h"

@interface ExampleMenuViewController ()

@end

@implementation ExampleMenuViewController

-(id) initWithCoder:(NSCoder *)aDecoder{
if (self = [super initWithCoder:aDecoder]) {
self.slideMenuDataSource = self;

}
return self;
}

-(id) initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil{
if(self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]){
self.slideMenuDataSource = self;
}
return self;
}

-(NSInteger) numberOfItems{
return 2;
}

-(NSString*) initialSegueId{
return @"dark";
}

-(NSString*) segueIdForIndex:(NSInteger) index{
if (index ==0 ) {
return @"dark";
}else {
return @"light";
}
}
-(NSString*) itemNameForIndex:(NSInteger) index{
if (index ==0 ) {
return @"Dark";
}else {
return @"Light";
}

}


@end
Binary file added SASlideMenu/SASlideMenu/Images/disclosure.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added SASlideMenu/SASlideMenu/Images/disclosure@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added SASlideMenu/SASlideMenu/Images/menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added SASlideMenu/SASlideMenu/Images/menu@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added SASlideMenu/SASlideMenu/Images/menuicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added SASlideMenu/SASlideMenu/Images/menuicon@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added SASlideMenu/SASlideMenu/Images/row.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added SASlideMenu/SASlideMenu/Images/row@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added SASlideMenu/SASlideMenu/Images/rowselected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added SASlideMenu/SASlideMenu/Images/rowselected@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions SASlideMenu/SASlideMenu/SASlideMenuCell.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// SASlideMenuCell.h
// SASlideMenu
//
// Created by Stefano Antonelli on 8/6/12.
// Copyright (c) 2012 Stefano Antonelli. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface SASlideMenuCell : UITableViewCell

@property (nonatomic, weak) IBOutlet UILabel* itemDescription;
@property (nonatomic, weak) IBOutlet UIImageView* disclosureImage;
@end
17 changes: 17 additions & 0 deletions SASlideMenu/SASlideMenu/SASlideMenuCell.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//
// SASlideMenuCell.m
// SASlideMenu
//
// Created by Stefano Antonelli on 8/6/12.
// Copyright (c) 2012 Stefano Antonelli. All rights reserved.
//

#import "SASlideMenuCell.h"

@implementation SASlideMenuCell

@synthesize itemDescription;
@synthesize disclosureImage;


@end
19 changes: 19 additions & 0 deletions SASlideMenu/SASlideMenu/SASlideMenuDataSource.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//
// SASlideMenuDataSource.h
// SASlideMenu
//
// Created by Stefano Antonelli on 7/30/12.
// Copyright (c) 2012 Stefano Antonelli. All rights reserved.
//

#import <Foundation/Foundation.h>

@protocol SASlideMenuDataSource <NSObject>

-(NSInteger) numberOfItems;

-(NSString*) initialSegueId;
-(NSString*) segueIdForIndex:(NSInteger) index;
-(NSString*) itemNameForIndex:(NSInteger) index;

@end
13 changes: 13 additions & 0 deletions SASlideMenu/SASlideMenu/SASlideMenuInitialSegue.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//
// SASlideMenuInitialSegue.h
// SASlideMenu
//
// Created by Stefano Antonelli on 7/31/12.
// Copyright (c) 2012 Stefano Antonelli. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface SASlideMenuInitialSegue : UIStoryboardSegue

@end
37 changes: 37 additions & 0 deletions SASlideMenu/SASlideMenu/SASlideMenuInitialSegue.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
//
// SASlideMenuInitialSegue.m
// SASlideMenu
//
// Created by Stefano Antonelli on 7/31/12.
// Copyright (c) 2012 Stefano Antonelli. All rights reserved.
//

#import "SASlideMenuInitialSegue.h"
#import "SASlideMenuViewController.h"
#import "SASlideMenuItemViewController.h"
#import <QuartzCore/QuartzCore.h>

@implementation SASlideMenuInitialSegue

-(void) perform{
SASlideMenuViewController* source = self.sourceViewController;
UINavigationController* destination = self.destinationViewController;

UIGraphicsBeginImageContext(destination.view.bounds.size);
[destination.view.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage* screenShotImage = UIGraphicsGetImageFromCurrentImageContext();
source.screenShotImageView.image = screenShotImage;
UIGraphicsEndImageContext();

[source.screenShotImageView setFrame:CGRectMake(0, 0, source.view.frame.size.width, source.view.frame.size.height)];


[UIView animateWithDuration:kStartUpAnimation delay:0 options:UIViewAnimationOptionCurveEaseInOut animations:^{
source.startUpView.alpha = 0.0;
} completion:^(BOOL done){
[source presentViewController:destination animated:NO completion:nil];
}];

}

@end
20 changes: 20 additions & 0 deletions SASlideMenu/SASlideMenu/SASlideMenuItemViewController.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//
// SASlideMenuItemViewController.h
// SASlideMenu
//
// Created by Stefano Antonelli on 7/30/12.
// Copyright (c) 2012 Stefano Antonelli. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "SASlideMenuViewController.h"

@interface SASlideMenuItemViewController : UINavigationController{
UIButton* menuButton;
}

@property(nonatomic, strong) NSObject<SASlideMenuViewControllerDelegate>* slideMenuDelegate;

- (void) slideMenuButtonTouched;

@end
Loading

0 comments on commit 14b5e21

Please sign in to comment.