Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5afa9a0fa9 | ||
|
|
851de6ba7d | ||
|
|
0ab9b0e6a2 | ||
|
|
ed1785d514 | ||
|
|
d310932e45 | ||
|
|
8e1d1040df | ||
|
|
f5847da4fb | ||
|
|
faf95986ac | ||
|
|
71708c994e | ||
|
|
0b403320fa | ||
|
|
5d041c1bac | ||
|
|
8e56e7cd18 | ||
|
|
a056df2e23 | ||
|
|
6bb7bc1051 | ||
|
|
68c1c15831 | ||
|
|
2ab14733a5 | ||
|
|
2900fcb254 | ||
|
|
5f11f00043 | ||
|
|
7f0951ca09 | ||
|
|
08908652c1 | ||
|
|
3981f6930b | ||
|
|
c6c6dd6254 | ||
|
|
f6121df6eb | ||
|
|
86ced39c50 | ||
|
|
7648567b0a | ||
|
|
f325b3c7c0 | ||
|
|
50e0ebbf97 | ||
|
|
3d7e47951f | ||
|
|
5d31dfa9bf | ||
|
|
2285009361 | ||
|
|
42ef7ce2f2 | ||
|
|
f6d649a79c |
+3
-3
@@ -1,11 +1,11 @@
|
||||
osx_image: xcode9.2
|
||||
osx_image: xcode10.1
|
||||
language: objective-c
|
||||
|
||||
xcode_project: FoldingCell/FoldingCell.xcodeproj
|
||||
xcode_scheme: FoldingCell
|
||||
xcode_sdk: iphonesimulator11.2
|
||||
xcode_sdk: iphonesimulator12.1
|
||||
|
||||
# SWIFT_VERSION: 4.0
|
||||
# SWIFT_VERSION: 4.2
|
||||
|
||||
# whitelist
|
||||
branches:
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
Pod::Spec.new do |s|
|
||||
s.name = 'FoldingCell'
|
||||
s.version = '4.0.0'
|
||||
s.version = '4.0.2'
|
||||
s.summary = 'UITableViewCell with folding animation.'
|
||||
s.homepage = 'https://github.com/Ramotion/folding-cell'
|
||||
s.license = 'MIT'
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
5A0E1C3021414940006A0374 /* FoldingCellDemoTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A0E1C2F21414940006A0374 /* FoldingCellDemoTests.swift */; };
|
||||
5A1225D821B65E8E005BBB26 /* RotationViewTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A1225D721B65E8E005BBB26 /* RotationViewTests.swift */; };
|
||||
8499D8881D0054A8004B5B37 /* FoldingCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 8499D8871D0054A8004B5B37 /* FoldingCell.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
9D57F31F1EDC7A6F0004599F /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9D57F31E1EDC7A6F0004599F /* AppDelegate.swift */; };
|
||||
9D57F3241EDC7A6F0004599F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9D57F3221EDC7A6F0004599F /* Main.storyboard */; };
|
||||
@@ -81,6 +82,7 @@
|
||||
5A0E1C2D21414940006A0374 /* FoldingCellDemoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FoldingCellDemoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
5A0E1C2F21414940006A0374 /* FoldingCellDemoTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FoldingCellDemoTests.swift; sourceTree = "<group>"; };
|
||||
5A0E1C3121414940006A0374 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
5A1225D721B65E8E005BBB26 /* RotationViewTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RotationViewTests.swift; sourceTree = "<group>"; };
|
||||
8499D8851D0054A8004B5B37 /* FoldingCell.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = FoldingCell.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
8499D8871D0054A8004B5B37 /* FoldingCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FoldingCell.h; sourceTree = "<group>"; };
|
||||
8499D8891D0054A8004B5B37 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
@@ -144,6 +146,7 @@
|
||||
children = (
|
||||
5A0E1C2F21414940006A0374 /* FoldingCellDemoTests.swift */,
|
||||
5A0E1C3121414940006A0374 /* Info.plist */,
|
||||
5A1225D721B65E8E005BBB26 /* RotationViewTests.swift */,
|
||||
);
|
||||
path = FoldingCellDemoTests;
|
||||
sourceTree = "<group>";
|
||||
@@ -403,6 +406,7 @@
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
5A1225D821B65E8E005BBB26 /* RotationViewTests.swift in Sources */,
|
||||
5A0E1C3021414940006A0374 /* FoldingCellDemoTests.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
@@ -584,7 +588,7 @@
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 11.4;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.1;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
@@ -632,7 +636,7 @@
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 11.4;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.1;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||
|
||||
@@ -28,7 +28,26 @@
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "5A0E1C2C21414940006A0374"
|
||||
BuildableName = "FoldingCellDemoTests.xctest"
|
||||
BlueprintName = "FoldingCellDemoTests"
|
||||
ReferencedContainer = "container:FoldingCell.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "8499D8841D0054A8004B5B37"
|
||||
BuildableName = "FoldingCell.framework"
|
||||
BlueprintName = "FoldingCell"
|
||||
ReferencedContainer = "container:FoldingCell.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
|
||||
@@ -121,18 +121,16 @@ 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 {
|
||||
$0.alpha = 0
|
||||
} else {
|
||||
$0.alpha = 1
|
||||
$0.backView?.alpha = 0
|
||||
}
|
||||
$0.alpha = animationType == .open ? 0 : 1
|
||||
if animationType != .open { $0.backView?.alpha = 0 }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -402,7 +400,7 @@ open class FoldingCell: UITableViewCell {
|
||||
|
||||
open class RotatedView: UIView {
|
||||
|
||||
fileprivate enum Const {
|
||||
private enum Const {
|
||||
static let rotationX = "rotation.x"
|
||||
static let transformRotationX = "transform.rotation.x"
|
||||
}
|
||||
|
||||
@@ -1,11 +1,3 @@
|
||||
//
|
||||
// FoldingCellDemoTests.swift
|
||||
// FoldingCellDemoTests
|
||||
//
|
||||
// Created by Alex K on 06/09/2018.
|
||||
// Copyright © 2018 Alex K. All rights reserved.
|
||||
//
|
||||
|
||||
import XCTest
|
||||
import UIKit
|
||||
@testable import FoldingCell
|
||||
@@ -24,11 +16,6 @@ class FoldingCellDemoTests: XCTestCase {
|
||||
foldingCell = vc.tableView.dequeueReusableCell(withIdentifier: "FoldingCell", for: IndexPath(row: 0, section: 0)) as? FoldingCell
|
||||
}
|
||||
|
||||
override func tearDown() {
|
||||
// Put teardown code here. This method is called after the invocation of each test method in the class.
|
||||
super.tearDown()
|
||||
}
|
||||
|
||||
func testCreateFoldingCell() {
|
||||
XCTAssertNotNil(foldingCell)
|
||||
}
|
||||
@@ -37,5 +24,7 @@ class FoldingCellDemoTests: XCTestCase {
|
||||
XCTAssertEqual(foldingCell.isUnfolded, false)
|
||||
foldingCell.unfold(true)
|
||||
XCTAssertEqual(foldingCell.isUnfolded, true)
|
||||
foldingCell.unfold(false)
|
||||
XCTAssertEqual(foldingCell.isUnfolded, false)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
import XCTest
|
||||
import UIKit
|
||||
@testable import FoldingCell
|
||||
|
||||
class RotationViewTests: XCTestCase {
|
||||
|
||||
var rotationView: RotatedView!
|
||||
override func setUp() {
|
||||
|
||||
rotationView = RotatedView()
|
||||
}
|
||||
|
||||
func testCreateRotationView() {
|
||||
XCTAssertNotNil(rotationView)
|
||||
}
|
||||
|
||||
func testAddBackView() {
|
||||
XCTAssertNil(rotationView.backView)
|
||||
let color = UIColor.red
|
||||
rotationView.addBackView(100, color: color)
|
||||
|
||||
XCTAssertNotNil(rotationView.backView)
|
||||
XCTAssertEqual(rotationView.backView?.backgroundColor, color)
|
||||
}
|
||||
|
||||
func testRotateX() {
|
||||
let key = "layer.transform.rotation.x"
|
||||
let startX = (rotationView.value(forKeyPath: key) as? NSNumber)?.floatValue
|
||||
XCTAssertEqual(startX, 0)
|
||||
|
||||
let angel: CGFloat = 0.5
|
||||
rotationView.rotatedX(angel)
|
||||
let x = (rotationView.value(forKeyPath: key) as? NSNumber)?.floatValue
|
||||
|
||||
XCTAssertEqual(x, Float(angel))
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,28 @@
|
||||

|
||||
<img src="https://github.com/Ramotion/folding-cell/blob/master/Screenshots/foldingCell.gif" width="600" height="450" /></a>
|
||||
<br><br/>
|
||||
<img src="https://github.com/Ramotion/folding-cell/blob/master/header.png">
|
||||
|
||||
<a href="https://github.com/Ramotion/folding-cell">
|
||||
<img align="left" src="https://github.com/Ramotion/folding-cell/blob/master/Screenshots/foldingCell.gif" width="480" height="360" /></a>
|
||||
|
||||
<p><h1 align="left">FOLDING CELL</h1></p>
|
||||
|
||||
<h4>Expanding content cell with animation inspired by folding paper card material design.</h4>
|
||||
|
||||
|
||||
___
|
||||
|
||||
|
||||
|
||||
<p><h6>We specialize in the designing and coding of custom UI for Mobile Apps and Websites.</h6>
|
||||
<a href="https://dev.ramotion.com?utm_source=gthb&utm_medium=repo&utm_campaign=folding-cell">
|
||||
<img src="https://github.com/ramotion/gliding-collection/raw/master/contact_our_team@2x.png" width="187" height="34"></a>
|
||||
</p>
|
||||
<p><h6>Stay tuned for the latest updates:</h6>
|
||||
<a href="https://goo.gl/rPFpid" >
|
||||
<img src="https://i.imgur.com/ziSqeSo.png/" width="156" height="28"></a></p>
|
||||
<h6><a href="https://store.ramotion.com/product/iphone-x-clay-mockups?utm_source=gthb&utm_medium=special&utm_campaign=folding-cell#demo">Get Free Mockup For your project →</a></h6>
|
||||
|
||||
</br>
|
||||
|
||||
# FoldingCell
|
||||
[](https://cocoapods.org/pods/FoldingCell)
|
||||
[](http://cocoapods.org/pods/FoldingCell)
|
||||
[](http://twitter.com/Ramotion)
|
||||
@@ -13,19 +33,6 @@
|
||||
[](https://github.com/igrigorik/ga-beacon)
|
||||
[](https://paypal.me/Ramotion)
|
||||
|
||||
# Check this library on other platforms:
|
||||
<a href="https://github.com/Ramotion/folding-cell-android">
|
||||
<img src="https://github.com/ramotion/navigation-stack/raw/master/Android_Java@2x.png" width="178" height="81"></a>
|
||||
|
||||
**Looking for developers for your project?**<br>
|
||||
This project is maintained by Ramotion, Inc. We specialize in the designing and coding of custom UI for Mobile Apps and Websites.
|
||||
|
||||
<a href="mailto:alex.a@ramotion.com?subject=Project%20inquiry%20from%20Github">
|
||||
<img src="https://github.com/ramotion/gliding-collection/raw/master/contact_our_team@2x.png" width="187" height="34"></a> <br>
|
||||
|
||||
|
||||
The [iPhone mockup](https://store.ramotion.com/product/iphone-x-clay-mockups?utm_source=gthb&utm_medium=special&utm_campaign=folding-cell) available [here](https://store.ramotion.com?utm_source=gthb&utm_medium=special&utm_campaign=folding-cell).
|
||||
|
||||
## Requirements
|
||||
|
||||
- iOS 8.0+
|
||||
@@ -42,7 +49,6 @@ pod 'FoldingCell'
|
||||
or [Carthage](https://github.com/Carthage/Carthage) users can simply add Mantle to their `Cartfile`:
|
||||
```
|
||||
github "Ramotion/folding-cell"
|
||||
|
||||
```
|
||||
|
||||
or just drag and drop FoldingCell.swift file to your project
|
||||
@@ -156,24 +162,25 @@ fileprivate struct C {
|
||||
Create foregroundView and containerView from code (steps 2 - 3) look example:
|
||||
[Folding-cell-programmatically](https://github.com/ober01/Folding-cell-programmatically)
|
||||
|
||||
## Licence
|
||||
## 🗂 Check this library on other language:
|
||||
<a href="https://github.com/Ramotion/folding-cell-android">
|
||||
<img src="https://github.com/ramotion/navigation-stack/raw/master/Android_Java@2x.png" width="178" height="81"></a>
|
||||
|
||||
|
||||
## 📄 License
|
||||
|
||||
Folding cell is released under the MIT license.
|
||||
See [LICENSE](./LICENSE) for details.
|
||||
|
||||
This library is a part of a <a href="https://github.com/Ramotion/swift-ui-animation-components-and-libraries"><b>selection of our best UI open-source projects.</b></a>
|
||||
|
||||
# Get the Showroom App for iOS to give it a try
|
||||
If you use the open-source library in your project, please make sure to credit and backlink to www.ramotion.com
|
||||
|
||||
## 📱 Get the Showroom App for iOS to give it a try
|
||||
Try this UI component and more like this in our iOS app. Contact us if interested.
|
||||
|
||||
<a href="https://itunes.apple.com/app/apple-store/id1182360240?pt=550053&ct=folding-cell&mt=8" >
|
||||
<img src="https://github.com/ramotion/gliding-collection/raw/master/app_store@2x.png" width="117" height="34"></a>
|
||||
|
||||
<a href="mailto:alex.a@ramotion.com?subject=Project%20inquiry%20from%20Github">
|
||||
<a href="https://dev.ramotion.com?utm_source=gthb&utm_medium=repo&utm_campaign=folding-cell">
|
||||
<img src="https://github.com/ramotion/gliding-collection/raw/master/contact_our_team@2x.png" width="187" height="34"></a>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
## Follow us for the latest update<br>
|
||||
<a href="https://goo.gl/rPFpid" >
|
||||
<img src="https://i.imgur.com/ziSqeSo.png/" width="156" height="28"></a>
|
||||
|
||||
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 16 KiB |
Reference in New Issue
Block a user