Skip to content

Commit

Permalink
Merge branch 'release/2.2.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Boldt committed Jul 5, 2019
2 parents cfc66b6 + 6b81d85 commit 05fdc1e
Show file tree
Hide file tree
Showing 13 changed files with 187 additions and 146 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 2.2.1 (2019-5-6)
- decreased minimum deployment target to iOS10

## 2.2.0 (2019-13-4)
- Swift 5.0 adaptions

Expand Down
4 changes: 2 additions & 2 deletions Example/Jelly.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = JY9STJR6M4;
INFOPLIST_FILE = Jelly/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MODULE_NAME = ExampleApp;
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.demo.Jelly;
Expand All @@ -589,7 +589,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = JY9STJR6M4;
INFOPLIST_FILE = Jelly/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MODULE_NAME = ExampleApp;
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.demo.Jelly;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,15 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "607FACCF1AFB9204008FA782"
BuildableName = "Jelly_Example.app"
BlueprintName = "Jelly_Example"
ReferencedContainer = "container:Jelly.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO">
Expand All @@ -53,17 +62,6 @@
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "607FACCF1AFB9204008FA782"
BuildableName = "Jelly_Example.app"
BlueprintName = "Jelly_Example"
ReferencedContainer = "container:Jelly.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -85,8 +83,6 @@
ReferencedContainer = "container:Jelly.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
2 changes: 1 addition & 1 deletion Example/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use_frameworks!
platform :ios, '11.0'
platform :ios, '10.0'

source 'https://github.com/CocoaPods/Specs.git'

Expand Down
4 changes: 2 additions & 2 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PODS:
- Jelly (2.1.1)
- Jelly (2.2.0)
- Nimble (8.0.1)
- Quick (2.0.0)
- TouchVisualizer (3.1.0)
Expand All @@ -21,7 +21,7 @@ EXTERNAL SOURCES:
:path: "../"

SPEC CHECKSUMS:
Jelly: c4c05425fa149542f2b7807f7d8e06f00e766e17
Jelly: d2f3f11045dc7c7db0be70b3584c075df9bc72ee
Nimble: 45f786ae66faa9a709624227fae502db55a8bdd0
Quick: ce1276c7c27ba2da3cb2fd0cde053c3648b3b22d
TouchVisualizer: b97b1efb0f25d1408bb4557e6f493eae454425e7
Expand Down
6 changes: 3 additions & 3 deletions Example/Pods/Local Podspecs/Jelly.podspec.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Example/Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

243 changes: 131 additions & 112 deletions Example/Pods/Pods.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Example/Pods/Target Support Files/Jelly/Jelly-Info.plist

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Jelly.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

Pod::Spec.new do |s|
s.name = 'Jelly'
s.version = '2.2.0'
s.version = '2.2.1'
s.summary = 'Jelly is a library for animated, non-interactive & interactive viewcontroller transitions and presentations with the focus on a simple and yet flexible API.'

s.description = <<-DESC
Expand All @@ -21,7 +21,7 @@ Pod::Spec.new do |s|
s.source = { :git => 'https://github.com/SebastianBoldt/Jelly.git', :tag => s.version.to_s }
s.social_media_url = 'https://twitter.com/sebastianboldt'

s.ios.deployment_target = '11.0'
s.ios.deployment_target = '10.0'
s.source_files = 'Jelly/Classes/**/*'
s.frameworks = 'UIKit'
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,16 @@ class InteractionController: UIPercentDrivenInteractiveTransition {
switch configuration.dragMode {
case .canvas:
let gesture = UIPanGestureRecognizer(target: self, action: #selector(handleGesture(_:)))
gesture.name = Constants.gestureRecognizerIdentifier
if #available(iOS 11.0, *) {
gesture.name = Constants.gestureRecognizerIdentifier
}
view.addGestureRecognizer(gesture)
case .edge:
let gesture = UIScreenEdgePanGestureRecognizer(target: self, action: #selector(handleGesture(_:)))
gesture.edges = presentationType == .dismiss ? dragDirection.dismissRectEdges : dragDirection.showRectEdges
gesture.name = Constants.gestureRecognizerIdentifier
if #available(iOS 11.0, *) {
gesture.name = Constants.gestureRecognizerIdentifier
}
view.addGestureRecognizer(gesture)
}
}
Expand Down
27 changes: 23 additions & 4 deletions Jelly/Classes/private/Extensions/UIView+RoundCorners.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,28 @@
import UIKit

extension UIView {
public func roundCorners(corners: CACornerMask = [.layerMaxXMaxYCorner,.layerMaxXMinYCorner, .layerMinXMaxYCorner, .layerMinXMinYCorner], radius: CGFloat = 0.0) {
layer.masksToBounds = true
layer.cornerRadius = radius
layer.maskedCorners = corners
func roundCorners(_ corners: CACornerMask, radius: CGFloat) {
if #available(iOS 11, *) {
self.layer.cornerRadius = radius
self.layer.maskedCorners = corners
} else {
var cornerMask = UIRectCorner()
if(corners.contains(.layerMinXMinYCorner)){
cornerMask.insert(.topLeft)
}
if(corners.contains(.layerMaxXMinYCorner)){
cornerMask.insert(.topRight)
}
if(corners.contains(.layerMinXMaxYCorner)){
cornerMask.insert(.bottomLeft)
}
if(corners.contains(.layerMaxXMaxYCorner)){
cornerMask.insert(.bottomRight)
}
let path = UIBezierPath(roundedRect: self.bounds, byRoundingCorners: cornerMask, cornerRadii: CGSize(width: radius, height: radius))
let mask = CAShapeLayer()
mask.path = path.cgPath
self.layer.mask = mask
}
}
}
4 changes: 2 additions & 2 deletions Jelly/Classes/private/PresentationController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ final class PresentationController: UIPresentationController, PresentationContro
presentedViewController.view.layer.masksToBounds = true
let corners = presentation.presentationUIConfiguration.corners
let radius = presentation.presentationUIConfiguration.cornerRadius
presentedViewController.view.roundCorners(corners: corners, radius: radius)
presentedViewController.view.roundCorners(corners, radius: radius)
}

func updatePresentation(presentation: Presentation, duration: Duration) {
Expand Down Expand Up @@ -61,7 +61,7 @@ final class PresentationController: UIPresentationController, PresentationContro
presentedView?.frame = frameOfPresentedViewInContainerView
let corners = presentation.presentationUIConfiguration.corners
let radius = presentation.presentationUIConfiguration.cornerRadius
presentedView?.roundCorners(corners: corners, radius: radius)
presentedView?.roundCorners(corners, radius: radius)
}

override func size(forChildContentContainer container: UIContentContainer,
Expand Down

0 comments on commit 05fdc1e

Please sign in to comment.