-
Notifications
You must be signed in to change notification settings - Fork 270
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
23 changed files
with
1,092 additions
and
505 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
Pod::Spec.new do |s| | ||
s.name = "Presentr" | ||
s.version = "1.1.1" | ||
s.summary = "A simple Swift wrapper for typical custom view controller presentations." | ||
s.version = "1.2.0" | ||
s.summary = "A simple Swift wrapper for custom view controller presentations." | ||
s.description = <<-DESC | ||
A micro framework created in Swift. Simplifies creating custom view controller presentations. Specially the typical ones we use which are a popup, an alert, or a any non-full-screen modal. Abstracts having to deal with custom presentation controllers and transitioning delegates | ||
Simplifies creating custom view controller presentations. Specially the typical ones we use which are a popup, an alert, or a any non-full-screen modal. Abstracts having to deal with custom presentation controllers and transitioning delegates | ||
DESC | ||
s.homepage = "http://github.com/icalialabs/Presentr" | ||
s.license = { :type => "MIT", :file => "LICENSE" } | ||
s.author = { "Daniel Lozano" => "[email protected]" } | ||
s.social_media_url = "http://twitter.com/danlozanov" | ||
s.platform = :ios, "8.0" | ||
s.source = { :git => "https://github.com/icalialabs/Presentr.git", :tag => "1.1.1" } | ||
s.source = { :git => "https://github.com/icalialabs/Presentr.git", :tag => "1.2.0" } | ||
s.source_files = "Presentr/**/*.{swift}" | ||
s.resources = "Presentr/**/*.{xib,ttf}" | ||
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,36 @@ | ||
// | ||
// BackgroundView.swift | ||
// Pods | ||
// | ||
// Created by Daniel Lozano Valdés on 3/20/17. | ||
// | ||
// | ||
|
||
import UIKit | ||
|
||
class PassthroughBackgroundView: UIView { | ||
|
||
var passthroughViews: [UIView] = [] | ||
|
||
var shouldPassthrough = true | ||
|
||
override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? { | ||
var view = super.hitTest(point, with: event) | ||
|
||
if !shouldPassthrough { | ||
return view | ||
} | ||
|
||
if view == self { | ||
for passthroughView in passthroughViews { | ||
view = passthroughView.hitTest(convert(point, to: passthroughView), with: event) | ||
if view != nil { | ||
break | ||
} | ||
} | ||
} | ||
|
||
return view | ||
} | ||
|
||
} |
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,19 @@ | ||
// | ||
// CoverVerticalAnimation.swift | ||
// Pods | ||
// | ||
// Created by Daniel Lozano Valdés on 3/21/17. | ||
// | ||
// | ||
|
||
import Foundation | ||
|
||
public class CoverVerticalAnimation: PresentrAnimation { | ||
|
||
override public func transform(containerFrame: CGRect, finalFrame: CGRect) -> CGRect { | ||
var initialFrame = finalFrame | ||
initialFrame.origin.y = containerFrame.height + initialFrame.height | ||
return initialFrame | ||
} | ||
|
||
} |
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 was deleted.
Oops, something went wrong.
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,25 @@ | ||
// | ||
// CrossDissolveAnimation.swift | ||
// Pods | ||
// | ||
// Created by Daniel Lozano Valdés on 3/21/17. | ||
// | ||
// | ||
|
||
import Foundation | ||
|
||
public class CrossDissolveAnimation: PresentrAnimation { | ||
|
||
override public func beforeAnimation(using transitionContext: PresentrTransitionContext) { | ||
transitionContext.animatingView?.alpha = transitionContext.isPresenting ? 0.0 : 1.0 | ||
} | ||
|
||
override public func performAnimation(using transitionContext: PresentrTransitionContext) { | ||
transitionContext.animatingView?.alpha = transitionContext.isPresenting ? 1.0 : 0.0 | ||
} | ||
|
||
override public func afterAnimation(using transitionContext: PresentrTransitionContext) { | ||
transitionContext.animatingView?.alpha = 1.0 | ||
} | ||
|
||
} |
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
Oops, something went wrong.