diff --git a/ElasticTransistionExample/Base.lproj/Main.storyboard b/ElasticTransistionExample/Base.lproj/Main.storyboard
index 5bff431..2797468 100644
--- a/ElasticTransistionExample/Base.lproj/Main.storyboard
+++ b/ElasticTransistionExample/Base.lproj/Main.storyboard
@@ -36,8 +36,8 @@
-
-
+
+
@@ -65,7 +65,7 @@
-
+
@@ -84,7 +84,7 @@
-
+
diff --git a/ElasticTransistionExample/Cell/CellDimensionAndTypeDelegate.h b/ElasticTransistionExample/Cell/CellDimensionAndTypeDelegate.h
new file mode 100644
index 0000000..700bb2f
--- /dev/null
+++ b/ElasticTransistionExample/Cell/CellDimensionAndTypeDelegate.h
@@ -0,0 +1,27 @@
+//
+// CellDimensionAndTypeDelegate.h
+// ElasticTransitionExample
+//
+// Created by Tigielle on 16/02/16.
+// Copyright © 2016 Matteo Tagliafico. All rights reserved.
+//
+
+#import
+
+typedef NS_ENUM(int, PropertyRelated){
+ STICKY,
+ SHADOW,
+ RADIUS
+};
+
+@protocol CellDimensionAndTypeDelegate
+
+@required
+@property (nonatomic) PropertyRelated type;
+@property (nonatomic) CGFloat rowHeigth;
+@property (nonatomic) NSString *name;
+
+@optional
+-(void)didChangeStateToOn:(BOOL)on;
+
+@end
diff --git a/ElasticTransistionExample/Cell/CellModel/SwitchCellModel.h b/ElasticTransistionExample/Cell/CellModel/SwitchCellModel.h
new file mode 100644
index 0000000..cfd848e
--- /dev/null
+++ b/ElasticTransistionExample/Cell/CellModel/SwitchCellModel.h
@@ -0,0 +1,29 @@
+//
+// SwitchCellModel.h
+// ElasticTransitionExample
+//
+// Created by Tigielle on 16/02/16.
+// Copyright © 2016 Matteo Tagliafico. All rights reserved.
+//
+
+#import
+#import "CellDimensionAndTypeDelegate.h"
+
+@protocol CellStateChange;
+
+@interface SwitchCellModel : NSObject
+
+@property (nonatomic) BOOL on;
+@property (nonatomic, weak) id delegate;
+
+- (void)setSwitchOn:(BOOL)on;
+
+@end
+
+
+@protocol CellStateChange
+
+@optional
+-(void)didChangeStateToOn:(BOOL)on AndPropertyRelated:(PropertyRelated)property;
+
+@end
\ No newline at end of file
diff --git a/ElasticTransistionExample/Cell/CellModel/SwitchCellModel.m b/ElasticTransistionExample/Cell/CellModel/SwitchCellModel.m
new file mode 100644
index 0000000..5f26f3c
--- /dev/null
+++ b/ElasticTransistionExample/Cell/CellModel/SwitchCellModel.m
@@ -0,0 +1,42 @@
+//
+// SwitchCellModel.m
+// ElasticTransitionExample
+//
+// Created by Tigielle on 16/02/16.
+// Copyright © 2016 Matteo Tagliafico. All rights reserved.
+//
+
+#import "SwitchCellModel.h"
+
+@implementation SwitchCellModel
+
+@synthesize type, rowHeigth;
+@synthesize name;
+
+-(id)initWithName:(NSString*)aName AndOn:(BOOL)on{
+
+ self = [super init];
+
+ if(self){
+
+ self.rowHeigth = 54.0;
+ self.name = aName;
+ self.on = on;
+ }
+
+ return self;
+}
+
+- (void)setSwitchOn:(BOOL)on{
+
+ self.on = on;
+
+ id strongDelegate = self.delegate;
+
+ if([strongDelegate respondsToSelector:@selector(didChangeStateToOn:AndPropertyRelated:)]){
+
+ [strongDelegate didChangeStateToOn:on AndPropertyRelated:self.type];
+ }
+}
+
+@end
diff --git a/ElasticTransistionExample/Cell/SegmentCell.h b/ElasticTransistionExample/Cell/SegmentCell.h
new file mode 100644
index 0000000..8d601b8
--- /dev/null
+++ b/ElasticTransistionExample/Cell/SegmentCell.h
@@ -0,0 +1,21 @@
+//
+// SegmentCell.h
+// ElasticTransitionExample
+//
+// Created by Tigielle on 16/02/16.
+// Copyright © 2016 Matteo Tagliafico. All rights reserved.
+//
+
+#import
+#import "CellDimensionAndTypeDelegate.h"
+
+@interface SegmentCell : UITableViewCell
+
+@property (nonatomic) NSMutableArray *values;
+
+@property (nonatomic, weak) IBOutlet UILabel *nameLabel;
+@property (nonatomic, weak) IBOutlet UISegmentedControl *segment;
+
+-(IBAction)segmentChanged:(UISegmentedControl*)sender;
+
+@end
diff --git a/ElasticTransistionExample/Cell/SegmentCell.m b/ElasticTransistionExample/Cell/SegmentCell.m
new file mode 100644
index 0000000..1af6b59
--- /dev/null
+++ b/ElasticTransistionExample/Cell/SegmentCell.m
@@ -0,0 +1,36 @@
+//
+// SegmentCell.m
+// ElasticTransitionExample
+//
+// Created by Tigielle on 16/02/16.
+// Copyright © 2016 Matteo Tagliafico. All rights reserved.
+//
+
+#import "SegmentCell.h"
+
+@implementation SegmentCell
+
+@synthesize type, rowHeigth;
+
+- (id)initWithCoder:(NSCoder *)aDecoder
+{
+ self = [super initWithCoder:aDecoder];
+
+ if (self) {
+
+ self.rowHeigth = 72.0;
+ }
+
+ return self;
+}
+
+-(void)onChangeValue:(id)value{
+
+}
+
+-(IBAction)segmentChanged:(UISegmentedControl*)sender{
+
+ [self onChangeValue:self.values[sender.selectedSegmentIndex]];
+}
+
+@end
diff --git a/ElasticTransistionExample/Cell/SliderCell.h b/ElasticTransistionExample/Cell/SliderCell.h
new file mode 100644
index 0000000..1f6e9c3
--- /dev/null
+++ b/ElasticTransistionExample/Cell/SliderCell.h
@@ -0,0 +1,19 @@
+//
+// SliderCell.h
+// ElasticTransitionExample
+//
+// Created by Tigielle on 16/02/16.
+// Copyright © 2016 Matteo Tagliafico. All rights reserved.
+//
+
+#import
+#import "CellDimensionAndTypeDelegate.h"
+
+@interface SliderCell : UITableViewCell
+
+@property (nonatomic, weak) IBOutlet UILabel *nameLabel;
+@property (nonatomic, weak) IBOutlet UISlider *slider;
+
+-(IBAction)sliderChanged:(UISlider*)sender;
+
+@end
diff --git a/ElasticTransistionExample/Cell/SliderCell.m b/ElasticTransistionExample/Cell/SliderCell.m
new file mode 100644
index 0000000..dc9739d
--- /dev/null
+++ b/ElasticTransistionExample/Cell/SliderCell.m
@@ -0,0 +1,36 @@
+//
+// SliderCell.m
+// ElasticTransitionExample
+//
+// Created by Tigielle on 16/02/16.
+// Copyright © 2016 Matteo Tagliafico. All rights reserved.
+//
+
+#import "SliderCell.h"
+
+@implementation SliderCell
+
+@synthesize type, rowHeigth;
+
+- (id)initWithCoder:(NSCoder *)aDecoder
+{
+ self = [super initWithCoder:aDecoder];
+
+ if (self) {
+
+ self.rowHeigth = 62.0;
+ }
+
+ return self;
+}
+
+-(IBAction)sliderChanged:(UISlider*)sender{
+
+ [self onChangeValue:sender.value];
+}
+
+-(void)onChangeValue:(CGFloat)value{
+
+}
+
+@end
diff --git a/ElasticTransistionExample/Cell/SwitchCell.h b/ElasticTransistionExample/Cell/SwitchCell.h
new file mode 100644
index 0000000..91abbf4
--- /dev/null
+++ b/ElasticTransistionExample/Cell/SwitchCell.h
@@ -0,0 +1,20 @@
+//
+// SwitchCell.h
+// ElasticTransitionExample
+//
+// Created by Tigielle on 16/02/16.
+// Copyright © 2016 Matteo Tagliafico. All rights reserved.
+//
+
+#import
+#import "SwitchCellModel.h"
+
+@interface SwitchCell : UITableViewCell
+
+@property (nonatomic, weak) IBOutlet UILabel *nameLabel;
+@property (nonatomic, weak) IBOutlet UISwitch *control;
+@property (nonatomic, weak) SwitchCellModel *cellModel;
+
+-(IBAction)switchChanged:(UISwitch*)sender;
+
+@end
diff --git a/ElasticTransistionExample/Cell/SwitchCell.m b/ElasticTransistionExample/Cell/SwitchCell.m
new file mode 100644
index 0000000..e150527
--- /dev/null
+++ b/ElasticTransistionExample/Cell/SwitchCell.m
@@ -0,0 +1,28 @@
+//
+// SwitchCell.m
+// ElasticTransitionExample
+//
+// Created by Tigielle on 16/02/16.
+// Copyright © 2016 Matteo Tagliafico. All rights reserved.
+//
+
+#import "SwitchCell.h"
+
+@implementation SwitchCell
+
+@synthesize cellModel;
+
+- (void)setCellModel:(SwitchCellModel *)aCellModel{
+
+ self->cellModel = aCellModel;
+
+ self.nameLabel.text = aCellModel.name;
+ [self.control setOn:aCellModel.on];
+}
+
+-(IBAction)switchChanged:(UISwitch*)sender{
+
+ [self.cellModel setSwitchOn:sender.on];
+}
+
+@end
\ No newline at end of file
diff --git a/ElasticTransistionExample/InitialViewController.m b/ElasticTransistionExample/InitialViewController.m
index f15b890..6cbb743 100644
--- a/ElasticTransistionExample/InitialViewController.m
+++ b/ElasticTransistionExample/InitialViewController.m
@@ -32,7 +32,8 @@ - (void)viewDidLoad {
transition.sticky = YES;
transition.showShadow = YES;
- transition.panThreshold = 0.3;
+ transition.panThreshold = 0.55;
+ transition.radiusFactor = 0.3;
transition.transformType = ROTATE;
//transition.overlayColor = [UIColor colorWithWhite:0 alpha:0.5];
diff --git a/ElasticTransistionExample/OptionsViewController.h b/ElasticTransistionExample/OptionsViewController.h
index e51adeb..4c56083 100644
--- a/ElasticTransistionExample/OptionsViewController.h
+++ b/ElasticTransistionExample/OptionsViewController.h
@@ -9,37 +9,6 @@
#import
#import "ElasticTransition.h"
-
-@interface SwitchCell:UITableViewCell
-
-@property (nonatomic, weak) IBOutlet UILabel *nameLabel;
-@property (nonatomic, weak) IBOutlet UISwitch *control;
-
--(IBAction)switchChanged:(UISwitch*)sender;
-
-@end
-
-@interface SliderCell:UITableViewCell
-
-@property (nonatomic, weak) IBOutlet UILabel *nameLabel;
-@property (nonatomic, weak) IBOutlet UISlider *slider;
-
--(IBAction)sliderChanged:(UISlider*)sender;
-
-@end
-
-@interface SegmentCell:UITableViewCell
-
-@property (nonatomic) NSMutableArray *values;
-
-@property (nonatomic, weak) IBOutlet UILabel *nameLabel;
-@property (nonatomic, weak) IBOutlet UISegmentedControl *segment;
-
--(IBAction)segmentChanged:(UISegmentedControl*)sender;
-
-@end
-
-
@interface OptionsViewController : UIViewController
@property (nonatomic, weak) IBOutlet UITableView *tableView;
diff --git a/ElasticTransistionExample/OptionsViewController.m b/ElasticTransistionExample/OptionsViewController.m
index 3e436e9..5dad38f 100644
--- a/ElasticTransistionExample/OptionsViewController.m
+++ b/ElasticTransistionExample/OptionsViewController.m
@@ -8,68 +8,21 @@
#import "OptionsViewController.h"
+#import "SwitchCellModel.h"
-@implementation SwitchCell
+#import "SwitchCell.h"
+#import "SliderCell.h"
+#import "SegmentCell.h"
--(void)onChangeOn:(BOOL)on{
-
-}
-
--(IBAction)switchChanged:(UISwitch*)sender{
-
- [self onChangeOn:sender.on];
-}
-
-@end
-
-
-@implementation SliderCell:UITableViewCell
-
--(void)onChangeValue:(CGFloat)value{
-
-}
-
--(IBAction)sliderChanged:(UISlider*)sender{
-
- [self onChangeValue:sender.value];
-}
-
-@end
-
-
-@implementation SegmentCell:UITableViewCell
-
--(id)initWithCoder:(NSCoder *)aDecoder{
-
- self = [super initWithCoder:aDecoder];
-
- if(self){
-
- self.values = [[NSMutableArray alloc] init];
- }
-
- return self;
-}
-
--(void)onChangeValue:(id)value{
-
-}
-
--(IBAction)segmentChanged:(UISegmentedControl*)sender{
-
- [self onChangeValue:self.values[sender.selectedSegmentIndex]];
-}
-
-@end
-
-
-@interface OptionsViewController (){
+@interface OptionsViewController (){
+ ElasticTransition *tm;
NSMutableArray *menuItems;
}
@end
+
@implementation OptionsViewController
@synthesize contentLength, dismissByBackgroundDrag, dismissByBackgroundTouch, dismissByForegroundDrag;
@@ -94,7 +47,7 @@ - (void)viewDidLoad {
[super viewDidLoad];
- ElasticTransition *tm = (ElasticTransition*)self.transitioningDelegate;
+ tm = (ElasticTransition*)self.transitioningDelegate;
NSMutableArray *va = [[NSMutableArray alloc] init];
@@ -105,28 +58,22 @@ - (void)viewDidLoad {
menuItems = [[NSMutableArray alloc] init];
- /*
- menu.append(.Switch(name: "Sticky", on:tm.sticky, onChange: {on in
- tm.sticky = on
- }))
- menu.append(.Switch(name: "Shadow", on:tm.showShadow, onChange: {on in
- tm.showShadow = on
- }))
- menu.append(LeftMenuType.Segment(name: "Transform Type",values:va,selected:tm.transformType.rawValue, onChange: {value in
- tm.transformType = value as! ElasticTransitionBackgroundTransform
- }))
- menu.append(.Slider(name: "Damping", value:Float(tm.damping), onChange: {value in
- tm.damping = CGFloat(value)
- }))
- menu.append(.Slider(name: "Radius Factor", value:Float(tm.radiusFactor)/0.5, onChange: {value in
- tm.radiusFactor = CGFloat(value) * CGFloat(0.5)
- }))
- menu.append(.Slider(name: "Pan Theashold", value:Float(tm.panThreshold), onChange: {value in
- tm.panThreshold = CGFloat(value)
- }))
-
- */
- self.contentLength = 300.0;
+ SwitchCellModel *stickySwitchModel = [[SwitchCellModel alloc]init];
+ stickySwitchModel.name = @"Sticky";
+ stickySwitchModel.on = tm.sticky;
+ stickySwitchModel.rowHeigth = 54.0;
+ stickySwitchModel.type = STICKY;
+ stickySwitchModel.delegate = self;
+ [menuItems addObject:stickySwitchModel];
+
+ SwitchCellModel *shadowSwitchModel = [[SwitchCellModel alloc]init];
+ shadowSwitchModel.name = @"Shadow";
+ shadowSwitchModel.on = tm.showShadow;
+ shadowSwitchModel.rowHeigth = 54.0;
+ shadowSwitchModel.type = SHADOW;
+ shadowSwitchModel.delegate = self;
+ [menuItems addObject:shadowSwitchModel];
+
for (int i = 0 ; i < menuItems.count; i++) {
@@ -135,7 +82,7 @@ - (void)viewDidLoad {
NSLog(@"[OptionsViewController] Content length: %f", self.contentLength);
- // [self.tableView reloadData];
+ [self.tableView reloadData];
}
@@ -143,50 +90,37 @@ -(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
return 1;
}
-/*
--(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
+-(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
+
UITableViewCell *cell;
- switch (indexPath.row){
- case 0:
+ switch (indexPath.row) {
+ case 0:
+ case 1:
{
- SwitchCell *switchCell = [tableView dequeueReusableCellWithIdentifier:"switch" forIndexPath:indexPath];
- switchCell.nameLabel.text = @"Switch cell";
+ SwitchCellModel *itemModel = (SwitchCellModel *) [menuItems objectAtIndex:indexPath.row];
+
- SwitchCell *switchCell = tableView.dequeueReusableCellWithIdentifier("switch", forIndexPath: indexPath) as! SwitchCell
- switchCell.onChange = onChange
- switchCell.nameLabel.text = name
- switchCell.control.on = on
- cell = switchCell
+ SwitchCell *switchCell = [tableView dequeueReusableCellWithIdentifier:@"switch" forIndexPath:indexPath];
+ switchCell.cellModel = itemModel;
+ cell = switchCell;
+
break;
}
- case 1:
- let segmentCell = tableView.dequeueReusableCellWithIdentifier("segment", forIndexPath: indexPath) as! SegmentCell
- segmentCell.onChange = onChange
- segmentCell.nameLabel.text = name
- segmentCell.segment.removeAllSegments()
- segmentCell.values = values
- for v in values.reverse(){
- segmentCell.segment.insertSegmentWithTitle("\(v)", atIndex: 0, animated: false)
+ case 2:
+ {
+
}
- segmentCell.segment.selectedSegmentIndex = selected
- cell = segmentCell
- break;
- case 2:
- let sliderCell = tableView.dequeueReusableCellWithIdentifier("slider", forIndexPath: indexPath) as! SliderCell
- sliderCell.onChange = onChange
- sliderCell.nameLabel.text = name
- sliderCell.slider.maximumValue = 1.0
- sliderCell.slider.minimumValue = 0
- sliderCell.slider.value = value
- cell = sliderCell
+ default:
break;
}
- return cell
+
+
+ return cell;
}
- */
+
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
@@ -195,13 +129,31 @@ -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
- switch (indexPath.row){
- case 0:
- return 54;
- case 1:
- return 62;
+
+ NSObject *itemModel = [menuItems objectAtIndex:indexPath.row];
+
+ if ([[itemModel class] conformsToProtocol:@protocol(CellDimensionAndTypeDelegate)]) {
+ NSObject *item = (NSObject *) itemModel;
+
+ return item.rowHeigth;
+
+ }else{
+ return 0.0;
+ }
+}
+
+
+-(void)didChangeStateToOn:(BOOL)on AndPropertyRelated:(PropertyRelated)property{
+
+ switch (property) {
+ case STICKY:
+ tm.sticky = on;
+ break;
+ case SHADOW:
+ tm.showShadow = on;
+ break;
default:
- return 72;
+ break;
}
}
diff --git a/ElasticTransition/EdgePanTransition.m b/ElasticTransition/EdgePanTransition.m
index 4bcc3c1..9eac1a2 100644
--- a/ElasticTransition/EdgePanTransition.m
+++ b/ElasticTransition/EdgePanTransition.m
@@ -28,7 +28,7 @@ -(id)init{
self.panThreshold = 0.2;
self.edge = RIGHT;
- //NSLog(@"[EdgePanTransition] %@" , [HelperFunctions typeToStringOfEdge:self.edge]);
+ NSLog(@"[EdgePanTransition] %@" , [HelperFunctions typeToStringOfEdge:self.edge]);
self.transitioning = NO;
self.presenting = YES;
@@ -153,7 +153,7 @@ -(void)startInteractivePresentFromViewController:(UIViewController*)fromVC ToVie
self.translation = [pan translationInView:pan.view];
self.dragPoint = [pan locationInView:pan.view];
- //NSLog(@"START T:(%.1f,%.1f)\tD:(%.1f,%.1f)", self.translation.x, self.translation.y, self.dragPoint.x, self.dragPoint.y);
+ NSLog(@"START T:(%.1f,%.1f)\tD:(%.1f,%.1f)", self.translation.x, self.translation.y, self.dragPoint.x, self.dragPoint.y);
}
@@ -165,14 +165,14 @@ -(BOOL)updateInteractiveTransitionWithGestureRecognizer:(UIPanGestureRecognizer*
return NO;
}
- //NSLog(@"UPDATE YES");
+ NSLog(@"UPDATE YES");
if (pan.state == UIGestureRecognizerStateChanged){
self.translation = [pan translationInView:pan.view];
self.dragPoint = [pan locationInView:pan.view];
- //NSLog(@"UPDATE T:(%.1f,%.1f)\tD:(%.1f,%.1f)", self.translation.x, self.translation.y, self.dragPoint.x, self.dragPoint.y);
+ NSLog(@"UPDATE T:(%.1f,%.1f)\tD:(%.1f,%.1f)", self.translation.x, self.translation.y, self.dragPoint.x, self.dragPoint.y);
[self update];
diff --git a/ElasticTransition/ElasticShapeLayer.m b/ElasticTransition/ElasticShapeLayer.m
index 41d1711..f3abf18 100644
--- a/ElasticTransition/ElasticShapeLayer.m
+++ b/ElasticTransition/ElasticShapeLayer.m
@@ -83,7 +83,7 @@ -(CGPathRef)currentPath{
CGPoint centerPoint = self.dragPoint;
- //NSLog(@"D:(%.1f,%.1f)",self.dragPoint.x, self.dragPoint.y);
+ NSLog(@"D:(%.1f,%.1f)",self.dragPoint.x, self.dragPoint.y);
CGPoint leftPoint, rightPoint, bottomRightPoint, bottomLeftPoint;
diff --git a/ElasticTransition/ElasticTransition.m b/ElasticTransition/ElasticTransition.m
index ba87427..c0aacf7 100644
--- a/ElasticTransition/ElasticTransition.m
+++ b/ElasticTransition/ElasticTransition.m
@@ -55,7 +55,7 @@ -(id)init{
self.transformType = TRANSLATEMID;
- //NSLog(@"[ElasticTransition] %@", [self transformTypeToString]);
+ NSLog(@"[ElasticTransition] %@", [self transformTypeToString]);
self.startingPoint = CGPointZero;
@@ -113,7 +113,7 @@ -(void)setContentLength:(CGFloat)aContentLength{
self.stickDistance = self.sticky ? self.contentLength * self.panThreshold : 0.0;
- //NSLog(@"stickDistance: %f", self.stickDistance);
+ NSLog(@"stickDistance: %f", self.stickDistance);
}
@@ -201,6 +201,8 @@ - (BOOL) gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiv
if ([touch.view isKindOfClass:(UISlider.self)] ){
return FALSE;
}
+
+
if (gestureRecognizer == self.navigationExitPanGestureRecognizer){
return TRUE;
}
@@ -319,7 +321,7 @@ -(void)update{
}
- //NSLog(@"cb.point:(%.1f,%.1f) | lb.point:(%.1f,%.1f)", self.cb.point.x, self.cb.point.y, self.lb.point.x, self.lb.point.y);
+ NSLog(@"cb.point:(%.1f,%.1f) | lb.point:(%.1f,%.1f)", self.cb.point.x, self.cb.point.y, self.lb.point.x, self.lb.point.y);
}
}
@@ -467,7 +469,7 @@ -(void)updateShape{
}
}
- //NSLog(@"Translation: (%.1f, %.1f)", x, y);
+ NSLog(@"Translation: (%.1f, %.1f)", x, y);
self.backView.layer.transform = CATransform3DMakeTranslation(x, y, 0);
@@ -480,7 +482,7 @@ -(void)updateShape{
}
}
- //NSLog(@"progress: %f", progress);
+ NSLog(@"progress: %f", progress);
self.overlayView.alpha = progress;
diff --git a/ElasticTransition/Utils/HelperFunctions.h b/ElasticTransition/Utils/HelperFunctions.h
index 14d7907..f15225e 100644
--- a/ElasticTransition/Utils/HelperFunctions.h
+++ b/ElasticTransition/Utils/HelperFunctions.h
@@ -15,11 +15,6 @@ typedef NS_ENUM(int,Edge){
RIGHT
};
-typedef NS_ENUM(int,LeftMenuType){
- SWITCH,
- SLIDER,
- SEGMENT
-};
@interface HelperFunctions : NSObject
diff --git a/ElasticTransitionExample.xcodeproj/project.pbxproj b/ElasticTransitionExample.xcodeproj/project.pbxproj
index b153880..d010b89 100644
--- a/ElasticTransitionExample.xcodeproj/project.pbxproj
+++ b/ElasticTransitionExample.xcodeproj/project.pbxproj
@@ -23,6 +23,10 @@
BAC47E441C6C999900F8E005 /* ElasticTransition.m in Sources */ = {isa = PBXBuildFile; fileRef = BAC47E431C6C999900F8E005 /* ElasticTransition.m */; };
BAC47E4D1C6CB11600F8E005 /* DynamicItem.m in Sources */ = {isa = PBXBuildFile; fileRef = BAC47E4C1C6CB11600F8E005 /* DynamicItem.m */; };
BAC47E501C6CB3DE00F8E005 /* CustomSnapBehavior.m in Sources */ = {isa = PBXBuildFile; fileRef = BAC47E4F1C6CB3DE00F8E005 /* CustomSnapBehavior.m */; };
+ BAFB89681C732F5400FDA257 /* SwitchCell.m in Sources */ = {isa = PBXBuildFile; fileRef = BAFB89671C732F5400FDA257 /* SwitchCell.m */; };
+ BAFB896B1C732F6900FDA257 /* SliderCell.m in Sources */ = {isa = PBXBuildFile; fileRef = BAFB896A1C732F6900FDA257 /* SliderCell.m */; };
+ BAFB896E1C732F7C00FDA257 /* SegmentCell.m in Sources */ = {isa = PBXBuildFile; fileRef = BAFB896D1C732F7C00FDA257 /* SegmentCell.m */; };
+ BAFB89731C73352500FDA257 /* SwitchCellModel.m in Sources */ = {isa = PBXBuildFile; fileRef = BAFB89721C73352500FDA257 /* SwitchCellModel.m */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
@@ -58,6 +62,15 @@
BAC47E4C1C6CB11600F8E005 /* DynamicItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DynamicItem.m; path = ElasticTransition/Utils/DynamicItem.m; sourceTree = SOURCE_ROOT; };
BAC47E4E1C6CB3DE00F8E005 /* CustomSnapBehavior.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CustomSnapBehavior.h; path = ElasticTransition/Utils/CustomSnapBehavior.h; sourceTree = SOURCE_ROOT; };
BAC47E4F1C6CB3DE00F8E005 /* CustomSnapBehavior.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CustomSnapBehavior.m; path = ElasticTransition/Utils/CustomSnapBehavior.m; sourceTree = SOURCE_ROOT; };
+ BAFB89661C732F5400FDA257 /* SwitchCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SwitchCell.h; path = Cell/SwitchCell.h; sourceTree = ""; };
+ BAFB89671C732F5400FDA257 /* SwitchCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SwitchCell.m; path = Cell/SwitchCell.m; sourceTree = ""; };
+ BAFB89691C732F6900FDA257 /* SliderCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SliderCell.h; path = Cell/SliderCell.h; sourceTree = ""; };
+ BAFB896A1C732F6900FDA257 /* SliderCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SliderCell.m; path = Cell/SliderCell.m; sourceTree = ""; };
+ BAFB896C1C732F7C00FDA257 /* SegmentCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SegmentCell.h; path = Cell/SegmentCell.h; sourceTree = ""; };
+ BAFB896D1C732F7C00FDA257 /* SegmentCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SegmentCell.m; path = Cell/SegmentCell.m; sourceTree = ""; };
+ BAFB896F1C732FC900FDA257 /* CellDimensionAndTypeDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CellDimensionAndTypeDelegate.h; path = Cell/CellDimensionAndTypeDelegate.h; sourceTree = ""; };
+ BAFB89711C73352500FDA257 /* SwitchCellModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SwitchCellModel.h; path = Cell/CellModel/SwitchCellModel.h; sourceTree = ""; };
+ BAFB89721C73352500FDA257 /* SwitchCellModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SwitchCellModel.m; path = Cell/CellModel/SwitchCellModel.m; sourceTree = ""; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -101,6 +114,7 @@
BAC47E2E1C6C979600F8E005 /* AboutViewController.m */,
BAC47E301C6C97B600F8E005 /* OptionsViewController.h */,
BAC47E311C6C97B600F8E005 /* OptionsViewController.m */,
+ BAFB89651C732F2900FDA257 /* Cell */,
BAC47E361C6C97F900F8E005 /* NavigationExampleViewController.h */,
BAC47E371C6C97F900F8E005 /* NavigationExampleViewController.m */,
BAC47DFF1C6C09D200F8E005 /* Main.storyboard */,
@@ -150,6 +164,30 @@
name = Utils;
sourceTree = "";
};
+ BAFB89651C732F2900FDA257 /* Cell */ = {
+ isa = PBXGroup;
+ children = (
+ BAFB89701C7334F700FDA257 /* Cell Model */,
+ BAFB89661C732F5400FDA257 /* SwitchCell.h */,
+ BAFB89671C732F5400FDA257 /* SwitchCell.m */,
+ BAFB89691C732F6900FDA257 /* SliderCell.h */,
+ BAFB896A1C732F6900FDA257 /* SliderCell.m */,
+ BAFB896C1C732F7C00FDA257 /* SegmentCell.h */,
+ BAFB896D1C732F7C00FDA257 /* SegmentCell.m */,
+ BAFB896F1C732FC900FDA257 /* CellDimensionAndTypeDelegate.h */,
+ );
+ name = Cell;
+ sourceTree = "";
+ };
+ BAFB89701C7334F700FDA257 /* Cell Model */ = {
+ isa = PBXGroup;
+ children = (
+ BAFB89711C73352500FDA257 /* SwitchCellModel.h */,
+ BAFB89721C73352500FDA257 /* SwitchCellModel.m */,
+ );
+ name = "Cell Model";
+ sourceTree = "";
+ };
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
@@ -223,12 +261,16 @@
BAC47E3E1C6C98F000F8E005 /* EdgePanTransition.m in Sources */,
BAC47E2C1C6C978700F8E005 /* InitialViewController.m in Sources */,
BAC47E3B1C6C98BD00F8E005 /* ElasticShapeLayer.m in Sources */,
+ BAFB89681C732F5400FDA257 /* SwitchCell.m in Sources */,
+ BAFB896B1C732F6900FDA257 /* SliderCell.m in Sources */,
BAC47E351C6C97CD00F8E005 /* MenuViewController.m in Sources */,
BAC47E381C6C97F900F8E005 /* NavigationExampleViewController.m in Sources */,
+ BAFB89731C73352500FDA257 /* SwitchCellModel.m in Sources */,
BAC47E441C6C999900F8E005 /* ElasticTransition.m in Sources */,
BA70DEB91C6F7F10008B5DB4 /* HelperFunctions.m in Sources */,
BAC47DFB1C6C09D200F8E005 /* AppDelegate.m in Sources */,
BAC47E4D1C6CB11600F8E005 /* DynamicItem.m in Sources */,
+ BAFB896E1C732F7C00FDA257 /* SegmentCell.m in Sources */,
BAC47E501C6CB3DE00F8E005 /* CustomSnapBehavior.m in Sources */,
BAC47E321C6C97B600F8E005 /* OptionsViewController.m in Sources */,
BAC47E2F1C6C979600F8E005 /* AboutViewController.m in Sources */,
diff --git a/ElasticTransitionExample.xcodeproj/project.xcworkspace/xcuserdata/tigielle.xcuserdatad/UserInterfaceState.xcuserstate b/ElasticTransitionExample.xcodeproj/project.xcworkspace/xcuserdata/tigielle.xcuserdatad/UserInterfaceState.xcuserstate
index 8250277..19f7466 100644
Binary files a/ElasticTransitionExample.xcodeproj/project.xcworkspace/xcuserdata/tigielle.xcuserdatad/UserInterfaceState.xcuserstate and b/ElasticTransitionExample.xcodeproj/project.xcworkspace/xcuserdata/tigielle.xcuserdatad/UserInterfaceState.xcuserstate differ
diff --git a/ElasticTransitionExample.xcodeproj/xcuserdata/tigielle.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/ElasticTransitionExample.xcodeproj/xcuserdata/tigielle.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
index fe2b454..fbff2e2 100644
--- a/ElasticTransitionExample.xcodeproj/xcuserdata/tigielle.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
+++ b/ElasticTransitionExample.xcodeproj/xcuserdata/tigielle.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
@@ -2,4 +2,278 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+