Swift 5.0 remix (#695)

* Swift 5.0

* Podspec

* Podspec version to 1.6

* Bump version in Jazzy and xcodeproj config files

Co-authored-by: Carlos Alcalá Helguero <carlos.alcala@externos.bci.cl>
This commit is contained in:
Joe Mattiello 2021-02-07 19:32:08 -05:00 committed by GitHub
parent f737a0a75d
commit 2de8d787ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 36 additions and 30 deletions

View File

@ -1,6 +1,6 @@
# ---- About ----
module: Hero
module_version: 1.5.0
module_version: 1.6.0
author: HeroTransitions
readme: README.md
copyright: 'See [license](https://github.com/HeroTransitions/Hero/blob/develop/LICENSE) for more details.'
@ -9,7 +9,7 @@ copyright: 'See [license](https://github.com/HeroTransitions/Hero/blob/develop/L
author_url: https://herotransitions.github.io/Hero/
dash_url: https://herotransitions.github.io/Hero/docsets/Hero.xml
github_url: https://github.com/HeroTransitions/Hero/
github_file_prefix: https://github.com/HeroTransitions/Hero/tree/1.5.0/
github_file_prefix: https://github.com/HeroTransitions/Hero/tree/1.6.0/
# ---- Sources ----
podspec: Hero.podspec

View File

@ -2,12 +2,12 @@
Pod::Spec.new do |s|
s.name = 'Hero'
s.version = '1.5.0'
s.version = '1.6.0'
s.summary = 'Elegant transition library for iOS'
s.description = <<-DESC
Hero is a library for building iOS view controller transitions.
It provides a declarative layer on top of the UIKit's cumbersome transition APIs.
Hero is a library for building iOS view controller transitions.
It provides a declarative layer on top of the UIKit's cumbersome transition APIs.
Making custom transitions an easy task for developers.
DESC
@ -16,21 +16,21 @@ Pod::Spec.new do |s|
s.documentation_url = 'https://herotransitions.github.io/Hero/'
s.screenshots = ['https://git.io/JeRkv', 'https://git.io/JeRke', 'https://git.io/JeRkf', 'https://git.io/JeRkJ']
s.license = { :type => 'MIT' }
s.author = {
s.author = {
'Luke' => 'lzhaoyilun@gmail.com',
'Joe Mattiello' => 'git@joemattiello.com'
'Joe Mattiello' => 'git@joemattiello.com'
}
s.source = { git: 'https://github.com/HeroTransitions/Hero.git', tag: s.version.to_s }
s.cocoapods_version = '>= 1.4.0'
s.ios.deployment_target = '8.0'
s.tvos.deployment_target = '9.0'
s.ios.deployment_target = '10.0'
s.tvos.deployment_target = '10.0'
s.ios.frameworks = 'UIKit', 'Foundation', 'QuartzCore', 'CoreGraphics', 'CoreMedia'
s.tvos.frameworks = 'UIKit', 'Foundation', 'QuartzCore', 'CoreGraphics', 'CoreMedia'
s.swift_version = '4.2'
s.swift_version = '5.0'
s.requires_arc = true

View File

@ -1186,7 +1186,7 @@
INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 1.5.0;
MARKETING_VERSION = 1.6.0;
PRODUCT_BUNDLE_IDENTIFIER = com.lkzhao.Hero;
PRODUCT_NAME = Hero;
SDKROOT = appletvos;
@ -1213,7 +1213,7 @@
INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 1.5.0;
MARKETING_VERSION = 1.6.0;
PRODUCT_BUNDLE_IDENTIFIER = com.lkzhao.Hero;
PRODUCT_NAME = Hero;
SDKROOT = appletvos;
@ -1236,7 +1236,7 @@
DEVELOPMENT_TEAM = 4VSEW78TKT;
INFOPLIST_FILE = TvOSExamples/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.5.0;
MARKETING_VERSION = 1.6.0;
PRODUCT_BUNDLE_IDENTIFIER = com.lkzhao.HeroTvOSExamples;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
@ -1256,7 +1256,7 @@
DEVELOPMENT_TEAM = 4VSEW78TKT;
INFOPLIST_FILE = TvOSExamples/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.5.0;
MARKETING_VERSION = 1.6.0;
PRODUCT_BUNDLE_IDENTIFIER = com.lkzhao.HeroTvOSExamples;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
@ -1283,7 +1283,7 @@
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 1.5.0;
MARKETING_VERSION = 1.6.0;
PRODUCT_BUNDLE_IDENTIFIER = com.lkzhao.Hero;
PRODUCT_NAME = Hero;
SKIP_INSTALL = YES;
@ -1310,7 +1310,7 @@
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 1.5.0;
MARKETING_VERSION = 1.6.0;
PRODUCT_BUNDLE_IDENTIFIER = com.lkzhao.Hero;
PRODUCT_NAME = Hero;
SKIP_INSTALL = YES;
@ -1443,7 +1443,7 @@
INFOPLIST_FILE = "$(SRCROOT)/Examples/Resources/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.5.0;
MARKETING_VERSION = 1.6.0;
PRODUCT_BUNDLE_IDENTIFIER = com.lkzhao.HeroExamples;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
@ -1460,7 +1460,7 @@
INFOPLIST_FILE = "$(SRCROOT)/Examples/Resources/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.5.0;
MARKETING_VERSION = 1.6.0;
PRODUCT_BUNDLE_IDENTIFIER = com.lkzhao.HeroExamples;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1000"
LastUpgradeVersion = "1100"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@ -29,8 +29,6 @@
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
@ -51,8 +49,6 @@
ReferencedContainer = "container:Hero.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1000"
LastUpgradeVersion = "1100"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildSystemType</key>
<string>Latest</string>
<key>PreviewsEnabled</key>
<false/>
</dict>
</plist>

View File

@ -167,7 +167,7 @@ extension HeroContext {
if superviewToNoSnapshotSubviewMap[superview] == nil {
superviewToNoSnapshotSubviewMap[superview] = []
}
if let index = superview.subviews.index(of: view) {
if let index = superview.subviews.firstIndex(of: view) {
superviewToNoSnapshotSubviewMap[superview]!.append((index, view))
}
}
@ -272,7 +272,7 @@ extension HeroContext {
let pairedView = pairedView(for: view),
let pairedSnapshot = snapshotViews[pairedView],
let siblingViews = pairedView.superview?.subviews,
let index = siblingViews.index(of: pairedView) {
let index = siblingViews.firstIndex(of: pairedView) {
let nextSiblings = siblingViews[index+1..<siblingViews.count]
containerView.addSubview(pairedSnapshot)
containerView.addSubview(snapshot)

View File

@ -157,7 +157,7 @@ extension HeroPlugin {
// MARK: Plugin Support
internal extension HeroTransition {
static func isEnabled(plugin: HeroPlugin.Type) -> Bool {
return enabledPlugins.index(where: { return $0 == plugin}) != nil
return enabledPlugins.firstIndex(where: { return $0 == plugin}) != nil
}
static func enable(plugin: HeroPlugin.Type) {
@ -166,7 +166,7 @@ internal extension HeroTransition {
}
static func disable(plugin: HeroPlugin.Type) {
if let index = enabledPlugins.index(where: { return $0 == plugin}) {
if let index = enabledPlugins.firstIndex(where: { return $0 == plugin}) {
enabledPlugins.remove(at: index)
}
}

View File

@ -42,8 +42,8 @@ extension HeroTransition: UITabBarControllerDelegate {
public func tabBarController(_ tabBarController: UITabBarController, animationControllerForTransitionFrom fromVC: UIViewController, to toVC: UIViewController) -> UIViewControllerAnimatedTransitioning? {
guard !isTransitioning else { return nil }
self.state = .notified
let fromVCIndex = tabBarController.children.index(of: fromVC)!
let toVCIndex = tabBarController.children.index(of: toVC)!
let fromVCIndex = tabBarController.children.firstIndex(of: fromVC)!
let toVCIndex = tabBarController.children.firstIndex(of: toVC)!
self.isPresenting = toVCIndex > fromVCIndex
self.fromViewController = fromViewController ?? fromVC
self.toViewController = toViewController ?? toVC