forked from stefanoa/SASlideMenu
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
765 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
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.
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.
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.
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.