-
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
7 changed files
with
136 additions
and
3 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
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 @@ | ||
// | ||
// SegueToBottom.h | ||
// Conductor | ||
// | ||
// Created by Draco Yam on 8/12/14. | ||
// | ||
// | ||
|
||
#import "ConductorSegue.h" | ||
|
||
@interface SegueToDrop : ConductorSegue | ||
|
||
@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,46 @@ | ||
// | ||
// SegueToBottom.m | ||
// Conductor | ||
// | ||
// Created by Draco Yam on 8/12/14. | ||
// | ||
// | ||
|
||
#import "SegueToDrop.h" | ||
|
||
@implementation SegueToDrop | ||
|
||
- (void) perform { | ||
[self prePerform]; | ||
|
||
// Layout subview layers | ||
[self.root.view bringSubviewToFront:self.fromCtr.view]; | ||
|
||
// Add to root.view if not added | ||
if (!self.toCtr.view.superview) { | ||
[self.root.view addSubview:self.toCtr.view]; | ||
} | ||
|
||
// Set view position for both to and from controller.view | ||
self.fromCtr.view.frame = CGRectMake(0, 0, self.fromCtr.view.frame.size.width, self.fromCtr.view.frame.size.height); | ||
self.toCtr.view.frame = CGRectMake(0, -self.toCtr.view.frame.size.height, self.toCtr.view.frame.size.width, self.toCtr.view.frame.size.height); | ||
|
||
// Set both to be unhidden | ||
self.fromCtr.view.alpha = 1; | ||
self.toCtr.view.alpha = 1; | ||
|
||
[UIView animateWithDuration: 0.3 | ||
delay: 0.0 | ||
options: self.animationOpt | ||
animations:^{ | ||
self.fromCtr.view.frame = CGRectMake(0, 0, self.fromCtr.view.frame.size.width, self.fromCtr.view.frame.size.height); | ||
self.toCtr.view.frame = CGRectMake(0, 0, self.toCtr.view.frame.size.width, self.toCtr.view.frame.size.height); | ||
} | ||
completion:^(BOOL finsihed){ | ||
[self postPerform]; | ||
}]; | ||
|
||
[self postPerform]; | ||
} | ||
|
||
@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 @@ | ||
// | ||
// SegueToTop.h | ||
// Conductor | ||
// | ||
// Created by Draco Yam on 8/12/14. | ||
// | ||
// | ||
|
||
#import "ConductorSegue.h" | ||
|
||
@interface SegueToTop : ConductorSegue | ||
|
||
@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,47 @@ | ||
// | ||
// SegueToTop.m | ||
// Conductor | ||
// | ||
// Created by Draco Yam on 8/12/14. | ||
// | ||
// | ||
|
||
#import "SegueToTop.h" | ||
|
||
@implementation SegueToTop | ||
|
||
- (void) perform { | ||
[self prePerform]; | ||
|
||
// Layout subview layers | ||
[self.root.view bringSubviewToFront:self.fromCtr.view]; | ||
|
||
// Add to root.view if not added | ||
[self.toCtr.view removeFromSuperview]; | ||
if (!self.toCtr.view.superview) { | ||
[self.root.view insertSubview:self.toCtr.view belowSubview:self.fromCtr.view]; | ||
} | ||
|
||
// Set view position for both to and from controller.view | ||
self.fromCtr.view.frame = CGRectMake(0, 0, self.fromCtr.view.frame.size.width, self.fromCtr.view.frame.size.height); | ||
self.toCtr.view.frame = CGRectMake(0, 0, self.toCtr.view.frame.size.width, self.toCtr.view.frame.size.height); | ||
|
||
// Set both to be unhidden | ||
self.fromCtr.view.alpha = 1; | ||
self.toCtr.view.alpha = 1; | ||
|
||
[UIView animateWithDuration: 0.3 | ||
delay: 0.0 | ||
options: self.animationOpt | ||
animations:^{ | ||
self.fromCtr.view.frame = CGRectMake(0, -self.fromCtr.view.frame.size.height, self.fromCtr.view.frame.size.width, self.fromCtr.view.frame.size.height); | ||
self.toCtr.view.frame = CGRectMake(0, 0, self.toCtr.view.frame.size.width, self.toCtr.view.frame.size.height); | ||
} | ||
completion:^(BOOL finsihed){ | ||
[self postPerform]; | ||
}]; | ||
|
||
[self postPerform]; | ||
} | ||
|
||
@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 |
---|---|---|
|
@@ -16,14 +16,14 @@ Pod::Spec.new do |s| | |
# | ||
|
||
s.name = "conductor" | ||
s.version = "0.0.1" | ||
s.version = "0.1.0" | ||
s.summary = "Conductor for managing uiviewcontrollers instead of using story board" | ||
|
||
s.homepage = "https://github.com/yamdraco/conductor" | ||
s.license = { :type => "MIT" } | ||
s.author = { "Draco Yam" => "[email protected]" } | ||
s.platform = :ios, "6.0" | ||
s.source = { :git => "https://github.com/yamdraco/conductor.git", :tag => "0.0.1" } | ||
s.source = { :git => "https://github.com/yamdraco/conductor.git", :tag => "0.1.0" } | ||
|
||
s.source_files = "Conductor/lib/*.{h,m}", "Conductor/lib/segue/*.{h,m}" | ||
s.requires_arc = true | ||
|