Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Cleaned up featuresExample.

  • Loading branch information...
commit aa7cb12d4eb79581826f62b9a28482fa42126f20 1 parent ef49001
@Inferis authored
View
6 FeaturesExample.xcodeproj/project.pbxproj
@@ -23,7 +23,6 @@
E2C8E5A41497F62B00560D23 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = E2C8E5A31497F62B00560D23 /* AppDelegate.m */; };
E2C8E5B81497F9CA00560D23 /* ChoiceController.m in Sources */ = {isa = PBXBuildFile; fileRef = E2C8E5B61497F9CA00560D23 /* ChoiceController.m */; };
E2C8E5B91497F9CA00560D23 /* ChoiceController.xib in Resources */ = {isa = PBXBuildFile; fileRef = E2C8E5B71497F9CA00560D23 /* ChoiceController.xib */; };
- E2C8E5C11497FC6400560D23 /* PathlikeSliderController.m in Sources */ = {isa = PBXBuildFile; fileRef = E2C8E5C01497FC6400560D23 /* PathlikeSliderController.m */; };
E2C8E5C61497FDC600560D23 /* PhotosController.m in Sources */ = {isa = PBXBuildFile; fileRef = E2C8E5C41497FDC600560D23 /* PhotosController.m */; };
E2C8E5C71497FDC600560D23 /* PhotosController.xib in Resources */ = {isa = PBXBuildFile; fileRef = E2C8E5C51497FDC600560D23 /* PhotosController.xib */; };
E2C8E5CB1497FDDB00560D23 /* SelectionController.m in Sources */ = {isa = PBXBuildFile; fileRef = E2C8E5C91497FDDB00560D23 /* SelectionController.m */; };
@@ -59,8 +58,6 @@
E2C8E5B51497F9CA00560D23 /* ChoiceController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChoiceController.h; sourceTree = "<group>"; };
E2C8E5B61497F9CA00560D23 /* ChoiceController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ChoiceController.m; sourceTree = "<group>"; };
E2C8E5B71497F9CA00560D23 /* ChoiceController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ChoiceController.xib; sourceTree = "<group>"; };
- E2C8E5BF1497FC6400560D23 /* PathlikeSliderController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PathlikeSliderController.h; sourceTree = "<group>"; };
- E2C8E5C01497FC6400560D23 /* PathlikeSliderController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PathlikeSliderController.m; sourceTree = "<group>"; };
E2C8E5C31497FDC600560D23 /* PhotosController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PhotosController.h; sourceTree = "<group>"; };
E2C8E5C41497FDC600560D23 /* PhotosController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PhotosController.m; sourceTree = "<group>"; };
E2C8E5C51497FDC600560D23 /* PhotosController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PhotosController.xib; sourceTree = "<group>"; };
@@ -138,8 +135,6 @@
E2C8E5B51497F9CA00560D23 /* ChoiceController.h */,
E2C8E5B61497F9CA00560D23 /* ChoiceController.m */,
E2C8E5B71497F9CA00560D23 /* ChoiceController.xib */,
- E2C8E5BF1497FC6400560D23 /* PathlikeSliderController.h */,
- E2C8E5C01497FC6400560D23 /* PathlikeSliderController.m */,
E2C8E5C21497FDAE00560D23 /* Content */,
);
path = FeaturesExample;
@@ -255,7 +250,6 @@
E2C8E5A01497F62B00560D23 /* main.m in Sources */,
E2C8E5A41497F62B00560D23 /* AppDelegate.m in Sources */,
E2C8E5B81497F9CA00560D23 /* ChoiceController.m in Sources */,
- E2C8E5C11497FC6400560D23 /* PathlikeSliderController.m in Sources */,
E2C8E5C61497FDC600560D23 /* PhotosController.m in Sources */,
E2C8E5CB1497FDDB00560D23 /* SelectionController.m in Sources */,
E2955F7014B728E4003DDB4E /* IIViewDeckController.m in Sources */,
View
10 FeaturesExample/ChoiceController.m
@@ -4,7 +4,9 @@
//
#import "ChoiceController.h"
-#import "PathlikeSliderController.h"
+#import "PhotosController.h"
+#import "SelectionController.h"
+#import "IIViewDeckController.h"
@interface ChoiceController () <IIViewDeckControllerDelegate> {
IIViewDeckPanningMode _panning;
@@ -54,7 +56,10 @@ - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interface
- (IBAction)pressedNavigate:(id)sender {
- PathlikeSliderController* controller = [[PathlikeSliderController alloc] init];
+ PhotosController* photosController = [[PhotosController alloc] initWithNibName:@"PhotosController" bundle:nil];
+ SelectionController* selectionController = [[SelectionController alloc] initWithNibName:@"SelectionController" bundle:nil];
+
+ IIViewDeckController* controller = [[IIViewDeckController alloc] initWithCenterViewController:photosController leftViewController:selectionController];
controller.panningMode = _panning;
controller.centerhiddenInteractivity = _centerHidden;
controller.navigationControllerBehavior = _navBehavior;
@@ -64,6 +69,7 @@ - (IBAction)pressedNavigate:(id)sender {
controller.elastic = _elastic;
controller.leftSize = 320;
controller.delegate = self;
+ [controller openLeftView];
[self.navigationController pushViewController:controller animated:YES];
}
View
11 FeaturesExample/PathlikeSliderController.h
@@ -1,11 +0,0 @@
-//
-// PathlikeSliderController.h
-// FeaturesExample
-//
-
-#import <UIKit/UIKit.h>
-#import "IIViewDeckController.h"
-
-@interface PathlikeSliderController : IIViewDeckController
-
-@end
View
59 FeaturesExample/PathlikeSliderController.m
@@ -1,59 +0,0 @@
-//
-// PathlikeSliderController.m
-// FeaturesExample
-//
-
-#import "PathlikeSliderController.h"
-#import "PhotosController.h"
-#import "SelectionController.h"
-#import <QuartzCore/QuartzCore.h>
-
-@implementation PathlikeSliderController
-
-- (id)init {
- PhotosController* photosController = [[PhotosController alloc] initWithNibName:@"PhotosController" bundle:nil];
- SelectionController* selectionController = [[SelectionController alloc] initWithNibName:@"SelectionController" bundle:nil];
-
- if ((self = [super initWithCenterViewController:photosController leftViewController:selectionController])) {
- }
-
- return self;
-}
-
-
-#pragma mark - View lifecycle
-
-- (void)loadView
-{
- [super loadView];
-
- self.navigationItem.leftBarButtonItems = [NSArray arrayWithObjects:
- [[UIBarButtonItem alloc] initWithTitle:@"Back" style:UIBarButtonItemStyleBordered target:self action:@selector(back)],
- [[UIBarButtonItem alloc] initWithTitle:@"Select" style:UIBarButtonItemStyleBordered target:self action:@selector(showSelector)],
- nil];
-
- self.navigationItem.title = @"Slide away";
-}
-
-- (void)back {
- [self closeLeftView];
- [self.navigationController popViewControllerAnimated:YES];
-}
-
-- (void)showSelector {
- [self toggleLeftViewAnimated:YES];
-}
-
-- (void)viewWillAppear:(BOOL)animated {
- [super viewWillAppear:animated];
-
- dispatch_async(dispatch_get_main_queue(), ^{
- [NSThread sleepForTimeInterval:0.01];
- [self openLeftViewAnimated:YES];
- });
-
-}
-
-
-
-@end
View
17 FeaturesExample/SelectionController.m
@@ -19,8 +19,25 @@ - (void)viewDidLoad
self.tableView.backgroundColor = [UIColor colorWithWhite:0.2 alpha:1];
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
+
+ self.navigationItem.leftBarButtonItems = [NSArray arrayWithObjects:
+ [[UIBarButtonItem alloc] initWithTitle:@"Back" style:UIBarButtonItemStyleBordered target:self action:@selector(back)],
+ [[UIBarButtonItem alloc] initWithTitle:@"Select" style:UIBarButtonItemStyleBordered target:self action:@selector(showSelector)],
+ nil];
+
+ self.navigationItem.title = @"Slide away";
+}
+
+- (void)back {
+ [self.viewDeckController closeLeftView];
+ [self.navigationController popViewControllerAnimated:YES];
}
+- (void)showSelector {
+ [self.viewDeckController toggleLeftViewAnimated:YES];
+}
+
+
#pragma mark - Table view data source
Please sign in to comment.
Something went wrong with that request. Please try again.