Skip to content

Commit

Permalink
Merge pull request #12 from mohpor/Swift5
Browse files Browse the repository at this point in the history
Swift5Package
  • Loading branch information
mohpor authored Aug 26, 2021
2 parents 0e8d34c + 9e1ea5b commit 4251545
Show file tree
Hide file tree
Showing 10 changed files with 67 additions and 31 deletions.
10 changes: 5 additions & 5 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ disabled_rules: # rule identifiers to exclude from running
- trailing_newline
- line_length
- function_body_length
- multiple_closures_with_trailing_closure

variable_name:
identifier_name:
min_length: 2
file_length:
warning: 1000
error: 2000
warning: 1000
error: 2000
type_body_length:
warning: 1000
use_nested_configs: true
warning: 1000
excluded: # paths to ignore during linting. Takes precedence over `included`.
- Build
25 changes: 25 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// swift-tools-version:5.3
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "TransEasy",
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
name: "TransEasy",
targets: ["TransEasy"])
],
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages this package depends on.
.target(
name: "TransEasy",
dependencies: [])
]
)
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public class TransEasySegue: UIStoryboardSegue {
containerView.insertSubview(destinationSnapshot, aboveSubview: sourceSnapshot)

// This is where we start to animate alongside the tranition coordinator.
transitionCoorrdinator.animate(alongsideTransition: { (context) in
transitionCoorrdinator.animate(alongsideTransition: { _ in

containerView.bringSubviewToFront(destinationSnapshot)
containerView.bringSubviewToFront(sourceSnapshot)
Expand All @@ -101,7 +101,7 @@ public class TransEasySegue: UIStoryboardSegue {
sourceSnapshot.alpha = 0.0
destinationSnapshot.alpha = 1.0

}) { (context) in
}) { _ in

sourceSnapshot.removeFromSuperview()
sourceFullSnap.removeFromSuperview()
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions TransEasy.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ Ever wanted to have that gorgeous zoom transition with your segues but hesitated
s.source = { :git => 'https://github.com/mohpor/TransEasy.git', :tag => s.version.to_s }
# s.social_media_url = 'https://twitter.com/mohpor'

s.ios.deployment_target = '8.0'
s.ios.deployment_target = '10.0'

s.source_files = 'Source/**/*'
s.source_files = 'Sources/TransEasy**/*'

# s.resource_bundles = {
# 'TransEasy' => ['TransEasy/Assets/*.png']
Expand Down
52 changes: 31 additions & 21 deletions TransEasy.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
113326D61D3DE48900D43634 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 113326D41D3DE48900D43634 /* LaunchScreen.storyboard */; };
113326E11D3E2DCE00D43634 /* FirstViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 113326E01D3E2DCE00D43634 /* FirstViewController.swift */; };
113326E31D3E2DDC00D43634 /* SecondViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 113326E21D3E2DDC00D43634 /* SecondViewController.swift */; };
113326E71D3E351500D43634 /* TransEasyAnimationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 113326E61D3E351500D43634 /* TransEasyAnimationController.swift */; };
115648221D45EF01006943B9 /* TransEasySegue.swift in Sources */ = {isa = PBXBuildFile; fileRef = 115648211D45EF01006943B9 /* TransEasySegue.swift */; };
95515FD91D4124EB00A896DB /* UIViewController+TransEasy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95515FD81D4124EB00A896DB /* UIViewController+TransEasy.swift */; };
9517998B26D852C30013C64D /* TransEasyAnimationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9517998826D852C30013C64D /* TransEasyAnimationController.swift */; };
9517998C26D852C30013C64D /* UIViewController+TransEasy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9517998926D852C30013C64D /* UIViewController+TransEasy.swift */; };
9517998D26D852C30013C64D /* TransEasySegue.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9517998A26D852C30013C64D /* TransEasySegue.swift */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand All @@ -27,9 +27,9 @@
113326D71D3DE48900D43634 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
113326E01D3E2DCE00D43634 /* FirstViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FirstViewController.swift; sourceTree = "<group>"; };
113326E21D3E2DDC00D43634 /* SecondViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SecondViewController.swift; sourceTree = "<group>"; };
113326E61D3E351500D43634 /* TransEasyAnimationController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TransEasyAnimationController.swift; sourceTree = "<group>"; };
115648211D45EF01006943B9 /* TransEasySegue.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TransEasySegue.swift; sourceTree = "<group>"; };
95515FD81D4124EB00A896DB /* UIViewController+TransEasy.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIViewController+TransEasy.swift"; sourceTree = "<group>"; };
9517998826D852C30013C64D /* TransEasyAnimationController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TransEasyAnimationController.swift; sourceTree = "<group>"; };
9517998926D852C30013C64D /* UIViewController+TransEasy.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIViewController+TransEasy.swift"; sourceTree = "<group>"; };
9517998A26D852C30013C64D /* TransEasySegue.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TransEasySegue.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand All @@ -46,7 +46,7 @@
113326BF1D3DE48900D43634 = {
isa = PBXGroup;
children = (
113326DD1D3DEB0200D43634 /* Source */,
9517998626D852C30013C64D /* Sources */,
113326CA1D3DE48900D43634 /* TransEasy */,
113326C91D3DE48900D43634 /* Products */,
);
Expand Down Expand Up @@ -76,14 +76,22 @@
path = TransEasy;
sourceTree = "<group>";
};
113326DD1D3DEB0200D43634 /* Source */ = {
9517998626D852C30013C64D /* Sources */ = {
isa = PBXGroup;
children = (
113326E61D3E351500D43634 /* TransEasyAnimationController.swift */,
95515FD81D4124EB00A896DB /* UIViewController+TransEasy.swift */,
115648211D45EF01006943B9 /* TransEasySegue.swift */,
9517998726D852C30013C64D /* TransEasy */,
);
path = Source;
path = Sources;
sourceTree = "<group>";
};
9517998726D852C30013C64D /* TransEasy */ = {
isa = PBXGroup;
children = (
9517998826D852C30013C64D /* TransEasyAnimationController.swift */,
9517998926D852C30013C64D /* UIViewController+TransEasy.swift */,
9517998A26D852C30013C64D /* TransEasySegue.swift */,
);
path = TransEasy;
sourceTree = "<group>";
};
/* End PBXGroup section */
Expand Down Expand Up @@ -114,12 +122,12 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0730;
LastUpgradeCheck = 1140;
LastUpgradeCheck = 1250;
ORGANIZATIONNAME = Porooshani;
TargetAttributes = {
113326C71D3DE48900D43634 = {
CreatedOnToolsVersion = 7.3.1;
LastSwiftMigration = 0800;
LastSwiftMigration = 1250;
};
};
};
Expand Down Expand Up @@ -177,10 +185,10 @@
files = (
113326E31D3E2DDC00D43634 /* SecondViewController.swift in Sources */,
113326CC1D3DE48900D43634 /* AppDelegate.swift in Sources */,
115648221D45EF01006943B9 /* TransEasySegue.swift in Sources */,
113326E71D3E351500D43634 /* TransEasyAnimationController.swift in Sources */,
9517998D26D852C30013C64D /* TransEasySegue.swift in Sources */,
113326E11D3E2DCE00D43634 /* FirstViewController.swift in Sources */,
95515FD91D4124EB00A896DB /* UIViewController+TransEasy.swift in Sources */,
9517998B26D852C30013C64D /* TransEasyAnimationController.swift in Sources */,
9517998C26D852C30013C64D /* UIViewController+TransEasy.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -230,6 +238,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand All @@ -254,7 +263,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -287,6 +296,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand All @@ -305,7 +315,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
Expand All @@ -326,7 +336,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.porooshani.TransEasy;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -342,7 +352,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.porooshani.TransEasy;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand Down
2 changes: 1 addition & 1 deletion TransEasy/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import UIKit
class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
// Override point for customization after application launch.
return true
}
Expand Down
1 change: 1 addition & 0 deletions TransEasy/Assets.xcassets/AppIcon.appiconset/Contents.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
"size" : "83.5x83.5"
},
{
"filename" : "[email protected]",
"idiom" : "ios-marketing",
"scale" : "1x",
"size" : "1024x1024"
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4251545

Please sign in to comment.