Compare commits

..
6 Commits
Author SHA1 Message Date
Alex K 2285009361 small improvements 2018-10-23 09:24:41 +03:00
Alex K f6d649a79c update podspec 2018-10-16 09:16:56 +03:00
Alex K 2bc6905e3a make openAnimation and closeAnimation functions private 2018-10-09 09:23:41 +03:00
Alex K f279359721 update swift-version file 2018-10-01 11:29:22 +03:00
Alex K 859a868aa4 add unfold test 2018-09-24 10:01:20 +03:00
Alex K c9c516dc19 update podspec 2018-09-17 10:34:01 +03:00
4 changed files with 12 additions and 4 deletions
+1 -1
View File
@@ -1 +1 @@
4.0
4.2
+1 -1
View File
@@ -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'
+4 -2
View File
@@ -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)
}
}