Skip to content

Commit

Permalink
fixed merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Dahan committed Apr 27, 2018
1 parent 100bf24 commit 515fc80
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 25 deletions.
3 changes: 2 additions & 1 deletion Motion.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Pod::Spec.new do |s|
s.name = 'Motion'
s.version = '1.3.5'
s.version = '1.4.0'
s.swift_version = '4.0'
s.license = 'MIT'
s.summary = 'A library used to create beautiful animations and transitions for Apple devices.'
s.homepage = 'http://cosmicmind.com'
Expand Down
6 changes: 5 additions & 1 deletion Motion.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@
96C98DC81E424AB000B22906 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0900;
LastUpgradeCheck = 0930;
ORGANIZATIONNAME = "CosmicMind, Inc.";
TargetAttributes = {
96C98DD01E424AB000B22906 = {
Expand Down Expand Up @@ -411,13 +411,15 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
Expand Down Expand Up @@ -471,13 +473,15 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
Expand Down
4 changes: 1 addition & 3 deletions Motion.xcodeproj/xcshareddata/xcschemes/Motion iOS.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0920"
LastUpgradeVersion = "0930"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -26,7 +26,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
Expand All @@ -37,7 +36,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
2 changes: 1 addition & 1 deletion Sources/Animator/MotionAnimator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import UIKit

public protocol MotionAnimator: class {
/// A reference to Motion.
weak var motion: MotionTransition! { get set }
var motion: MotionTransition! { get set }

/// Cleans the contexts.
func clean()
Expand Down
2 changes: 1 addition & 1 deletion Sources/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.3.5</string>
<string>1.4.0</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
Expand Down
4 changes: 1 addition & 3 deletions Sources/MotionContext.swift
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ public extension MotionContext {
case .optimized:
#if os(tvOS)
snapshot = view.snapshotView(afterScreenUpdates: true)!

#else
if #available(iOS 9.0, *), let stackView = view as? UIStackView {
snapshot = stackView.slowSnapshotView()
Expand Down Expand Up @@ -272,15 +272,13 @@ public extension MotionContext {
} else {
snapshot = view.snapshotView() ?? UIView()
}

#endif
}

#if os(tvOS)
if let imageView = view as? UIImageView, imageView.adjustsImageWhenAncestorFocused {
snapshot.frame = imageView.focusedFrameGuide.layoutFrame
}

#endif

view.layer.cornerRadius = oldCornerRadius
Expand Down
2 changes: 1 addition & 1 deletion Sources/Preprocessors/MotionPreprocessor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import UIKit

public protocol MotionPreprocessor: class {
/// A reference to Motion.
weak var motion: MotionTransition! { get set }
var motion: MotionTransition! { get set }

/**
Processes the transitionary views.
Expand Down
8 changes: 4 additions & 4 deletions Sources/Preprocessors/TransitionPreprocessor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -329,11 +329,11 @@ class TransitionPreprocessor: MotionCorePreprocessor {
}

#if os(tvOS)
context[fromView] = [.fade]
context[fromView] = [.fade]
#else
if (!isPresenting && toOverFullScreen) || !fv.isOpaque || (fv.backgroundColor?.alphaComponent ?? 1) < 1 {
context[fv] = [.fadeOut]
}
if (!isPresenting && toOverFullScreen) || !fv.isOpaque || (fv.backgroundColor?.alphaComponent ?? 1) < 1 {
context[fv] = [.fadeOut]
}
#endif

context[tv]!.append(.durationMatchLongest)
Expand Down
20 changes: 10 additions & 10 deletions Sources/Transition/MotionTransition+Start.swift
Original file line number Diff line number Diff line change
Expand Up @@ -238,19 +238,19 @@ fileprivate extension MotionTransition {
func processAnimation() {
#if os(tvOS)
animate()

#else
if isNavigationController {
// When animating within navigationController, we have to dispatch later into the main queue.
// otherwise snapshots will be pure white. Possibly a bug with UIKit
Motion.async { [weak self] in
self?.animate()
}

} else {
animate()
if isNavigationController {
// When animating within navigationController, we have to dispatch later into the main queue.
// otherwise snapshots will be pure white. Possibly a bug with UIKit
Motion.async { [weak self] in
self?.animate()
}

} else {
animate()
}

#endif
}
}
Expand Down

0 comments on commit 515fc80

Please sign in to comment.