Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion EasyTransitions.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ Pod::Spec.new do |s|
s.ios.deployment_target = '10.0'
s.tvos.deployment_target = '10.0'
s.source_files = 'EasyTransitions/Classes/**/*'
s.swift_version = '4.2'
s.swift_version = '5.1'
s.swift_versions = ['4.0', '4.2', '5.0', '5.1']
end
3 changes: 2 additions & 1 deletion EasyTransitions/Classes/Animators/ShowAnimator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ open class ShowAnimator: NavigationTransitionAnimator {
if presenting {
let fromFrame = fromView.frame
toView.frame = fromFrame
fromView.frame.offsetBy(dx: -fromFrame.size.width * 0.3, dy: 0)
fromView.frame = fromView.frame.offsetBy(dx: -fromFrame.size.width * 0.3, dy: 0)
// fromView.frame.offsetBy(dx: -fromFrame.size.width * 0.3, dy: 0)
} else {
let fromFrame = fromView.frame
fromView.frame = fromFrame.offsetBy(dx: fromFrame.size.width,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ public final class NavigationTransitionConfigurator: NSObject, UIViewControllerA
}

var isPush = false
if let toIndex = toViewController.navigationController?.viewControllers.index(of: toViewController),
let fromIndex = fromViewController.navigationController?.viewControllers.index(of: fromViewController) {
if let toIndex = toViewController.navigationController?.viewControllers.firstIndex(of: toViewController),
let fromIndex = fromViewController.navigationController?.viewControllers.firstIndex(of: fromViewController) {
isPush = toIndex > fromIndex
}

Expand Down
22 changes: 10 additions & 12 deletions Example/EasyTransitions.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0930;
LastUpgradeCheck = 0930;
LastUpgradeCheck = 1100;
ORGANIZATIONNAME = CocoaPods;
TargetAttributes = {
435DF8792094C87900E44793 = {
Expand All @@ -585,19 +585,19 @@
607FACCF1AFB9204008FA782 = {
CreatedOnToolsVersion = 6.3.1;
DevelopmentTeam = 8PC4X7QUY9;
LastSwiftMigration = 0900;
LastSwiftMigration = 1100;
};
607FACE41AFB9204008FA782 = {
CreatedOnToolsVersion = 6.3.1;
DevelopmentTeam = 8PC4X7QUY9;
LastSwiftMigration = 0900;
LastSwiftMigration = 1100;
TestTargetID = 607FACCF1AFB9204008FA782;
};
};
};
buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "EasyTransitions" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Expand Down Expand Up @@ -889,6 +889,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
Expand Down Expand Up @@ -945,6 +946,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
Expand Down Expand Up @@ -1002,8 +1004,7 @@
MODULE_NAME = ExampleApp;
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand All @@ -1020,8 +1021,7 @@
MODULE_NAME = ExampleApp;
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
Expand All @@ -1043,8 +1043,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -1061,8 +1060,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1010"
LastUpgradeVersion = "1100"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -27,6 +27,15 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "607FACCF1AFB9204008FA782"
BuildableName = "EasyTransitions_Example.app"
BlueprintName = "EasyTransitions_Example"
ReferencedContainer = "container:EasyTransitions.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO">
Expand All @@ -39,17 +48,6 @@
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "607FACCF1AFB9204008FA782"
BuildableName = "EasyTransitions_Example.app"
BlueprintName = "EasyTransitions_Example"
ReferencedContainer = "container:EasyTransitions.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -71,8 +69,6 @@
ReferencedContainer = "container:EasyTransitions.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Foundation

public extension Array {

public func enumeratedMap<T>(_ transform: (Int, Element) -> T) -> [T] {
func enumeratedMap<T>(_ transform: (Int, Element) -> T) -> [T] {
var result: [T] = []
result.reserveCapacity(count)
for (index, element) in self.enumerated() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public extension UICollectionView {
return indexPath(for: cell)?.item ?? -1
}

public var orderedVisibleCells: [UICollectionViewCell] {
var orderedVisibleCells: [UICollectionViewCell] {
let items = visibleCells
return items.sorted(by: { indexPathFor(cell: $1) > indexPathFor(cell: $0) })
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

import UIKit

fileprivate extension CGAffineTransform {
private extension CGAffineTransform {

fileprivate static var image: CGAffineTransform {
static var image: CGAffineTransform {
return CGAffineTransform(translationX: 0, y: 50.0)
.concatenating(.init(scaleX: 0.8, y: 0.8))
}
Expand Down
Loading