Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2285009361 | ||
|
|
f6d649a79c | ||
|
|
2bc6905e3a | ||
|
|
f279359721 | ||
|
|
859a868aa4 | ||
|
|
c9c516dc19 |
+1
-1
@@ -1 +1 @@
|
||||
4.0
|
||||
4.2
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
Pod::Spec.new do |s|
|
||||
s.name = 'FoldingCell'
|
||||
s.version = '3.1.5'
|
||||
s.version = '4.0.1'
|
||||
s.summary = 'UITableViewCell with folding animation.'
|
||||
s.homepage = 'https://github.com/Ramotion/folding-cell'
|
||||
s.license = 'MIT'
|
||||
|
||||
@@ -121,10 +121,12 @@ open class FoldingCell: UITableViewCell {
|
||||
|
||||
if animationType == .open {
|
||||
animationView?.subviews
|
||||
.lazy
|
||||
.compactMap { $0 as? RotatedView }
|
||||
.forEach { $0.alpha = 0 }
|
||||
} else {
|
||||
animationView?.subviews
|
||||
.lazy
|
||||
.compactMap { $0 as? RotatedView }
|
||||
.forEach {
|
||||
if animationType == .open {
|
||||
@@ -298,7 +300,7 @@ open class FoldingCell: UITableViewCell {
|
||||
return durations
|
||||
}
|
||||
|
||||
public func openAnimation(_ completion: (() -> Void)?) {
|
||||
func openAnimation(_ completion: (() -> Void)?) {
|
||||
isUnfolded = true
|
||||
removeImageItemsFromAnimationView()
|
||||
addImageItemsToAnimationView()
|
||||
@@ -345,7 +347,7 @@ open class FoldingCell: UITableViewCell {
|
||||
}
|
||||
}
|
||||
|
||||
public func closeAnimation(_ completion: (() -> Void)?) {
|
||||
func closeAnimation(_ completion: (() -> Void)?) {
|
||||
isUnfolded = false
|
||||
removeImageItemsFromAnimationView()
|
||||
addImageItemsToAnimationView()
|
||||
|
||||
@@ -32,4 +32,10 @@ class FoldingCellDemoTests: XCTestCase {
|
||||
func testCreateFoldingCell() {
|
||||
XCTAssertNotNil(foldingCell)
|
||||
}
|
||||
|
||||
func testUnfold() {
|
||||
XCTAssertEqual(foldingCell.isUnfolded, false)
|
||||
foldingCell.unfold(true)
|
||||
XCTAssertEqual(foldingCell.isUnfolded, true)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user