Commit 2722cb04 by Daniel Dahan

cleaned up MaterialAnimation internals

parent f38a412e
Pod::Spec.new do |s| Pod::Spec.new do |s|
s.name = 'MK' s.name = 'MK'
s.version = '1.21.1' s.version = '1.21.2'
s.license = { :type => "AGPLv3+", :file => "LICENSE" } s.license = { :type => "AGPLv3+", :file => "LICENSE" }
s.summary = 'A Material Design Framework In Swift' s.summary = 'A Material Design Framework In Swift'
s.homepage = 'http://materialkit.io' s.homepage = 'http://materialkit.io'
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>FMWK</string> <string>FMWK</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>1.21.1</string> <string>1.21.2</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
......
...@@ -377,40 +377,6 @@ public class MaterialButton : UIButton { ...@@ -377,40 +377,6 @@ public class MaterialButton : UIButton {
} }
} }
//
// :name: filterAnimations
//
internal func filterAnimations(animation: CAAnimation) -> Bool? {
if let a: CAPropertyAnimation = animation as? CAPropertyAnimation {
switch a.keyPath! {
case "position",
"transform",
"backgroundColor",
"transform.rotation",
"transform.scale",
"transform.scale.x",
"transform.scale.y",
"transform.scale.z",
"transform.translation",
"transform.translation.x",
"transform.translation.y",
"transform.translation.z":
return false
default:
return true
}
} else if let a: CAAnimationGroup = animation as? CAAnimationGroup {
for var i: Int = a.animations!.count - 1; 0 <= i; --i {
if let b: CAPropertyAnimation = a.animations![i] as? CAPropertyAnimation {
if false == filterAnimations(b) {
a.animations!.removeAtIndex(i)
}
}
}
}
return nil
}
/** /**
:name: touchesBegan :name: touchesBegan
*/ */
......
...@@ -370,40 +370,6 @@ public class MaterialView : UIView { ...@@ -370,40 +370,6 @@ public class MaterialView : UIView {
} }
// //
// :name: filterAnimations
//
internal func filterAnimations(animation: CAAnimation) -> Bool? {
if let a: CAPropertyAnimation = animation as? CAPropertyAnimation {
switch a.keyPath! {
case "position",
"transform",
"backgroundColor",
"transform.rotation",
"transform.scale",
"transform.scale.x",
"transform.scale.y",
"transform.scale.z",
"transform.translation",
"transform.translation.x",
"transform.translation.y",
"transform.translation.z":
return false
default:
return true
}
} else if let a: CAAnimationGroup = animation as? CAAnimationGroup {
for var i: Int = a.animations!.count - 1; 0 <= i; --i {
if let b: CAPropertyAnimation = a.animations![i] as? CAPropertyAnimation {
if false == filterAnimations(b) {
a.animations!.removeAtIndex(i)
}
}
}
}
return nil
}
//
// :name: prepareView // :name: prepareView
// //
internal func prepareView() { internal func prepareView() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment