Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5d062e7afb | ||
|
|
cad71f1978 | ||
|
|
1a2e00efb8 | ||
|
|
2187548e04 | ||
|
|
21400b213b | ||
|
|
e94aea843f | ||
|
|
6f1a6fa9b6 | ||
|
|
8aeec37d98 | ||
|
|
29e7a6488e | ||
|
|
5e21e0ef11 | ||
|
|
1b4659d06c | ||
|
|
e1ce24444f | ||
|
|
dc889f787d | ||
|
|
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 | ||
|
|
2bc6905e3a | ||
|
|
f279359721 | ||
|
|
859a868aa4 | ||
|
|
c9c516dc19 | ||
|
|
3335c26e78 | ||
|
|
27d2bc7a62 | ||
|
|
a4ea00866e | ||
|
|
882a279d56 | ||
|
|
959c31e2c5 | ||
|
|
8777fc4410 | ||
|
|
27b748230b | ||
|
|
f887081e42 | ||
|
|
370b3dae99 | ||
|
|
d6e2b6cebb | ||
|
|
a102990f70 | ||
|
|
78f726da6b | ||
|
|
de2815310c | ||
|
|
79ebfdad72 | ||
|
|
7fccf4465d | ||
|
|
10f2b4a593 | ||
|
|
2082c637fc | ||
|
|
1ad323db3e | ||
|
|
d0582c547e | ||
|
|
bab9a6cb13 | ||
|
|
eb0fb13162 | ||
|
|
28979e4c74 | ||
|
|
9b169a7eeb | ||
|
|
e61613727f | ||
|
|
b3c552e5e5 | ||
|
|
acca9eeba7 | ||
|
|
8c16530fbe | ||
|
|
e4babdc1cc | ||
|
|
d2ebb37052 | ||
|
|
8cfd463d24 | ||
|
|
99d33faa5b | ||
|
|
a4a918065d | ||
|
|
dbaccb42b5 | ||
|
|
adbd6a608b | ||
|
|
f41fbfe98e | ||
|
|
fd51a01d03 | ||
|
|
6f389b4850 | ||
|
|
9c1e834692 | ||
|
|
da447982c8 | ||
|
|
816fe67543 | ||
|
|
a191c4bc05 | ||
|
|
cbe678277d | ||
|
|
a760de74ee | ||
|
|
7d639d3332 |
+1
-1
@@ -1 +1 @@
|
||||
4.0
|
||||
4.2
|
||||
|
||||
+2
-4
@@ -1,11 +1,9 @@
|
||||
osx_image: xcode9.2
|
||||
osx_image: xcode10.2
|
||||
language: objective-c
|
||||
|
||||
xcode_project: FoldingCell/FoldingCell.xcodeproj
|
||||
xcode_scheme: FoldingCell
|
||||
xcode_sdk: iphonesimulator11.2
|
||||
|
||||
# SWIFT_VERSION: 4.0
|
||||
xcode_sdk: iphonesimulator12.2
|
||||
|
||||
# whitelist
|
||||
branches:
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
Pod::Spec.new do |s|
|
||||
s.name = 'FoldingCell'
|
||||
s.version = '3.0.3'
|
||||
s.version = '5.0.1'
|
||||
s.summary = 'UITableViewCell with folding animation.'
|
||||
s.homepage = 'https://github.com/Ramotion/folding-cell'
|
||||
s.license = 'MIT'
|
||||
|
||||
@@ -28,7 +28,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
|
||||
var window: UIWindow?
|
||||
|
||||
func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplicationLaunchOptionsKey: Any]? = nil) -> Bool {
|
||||
func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,6 +39,11 @@
|
||||
"idiom" : "iphone",
|
||||
"size" : "60x60",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ios-marketing",
|
||||
"size" : "1024x1024",
|
||||
"scale" : "1x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
|
||||
@@ -1,37 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="0cn-rv-Emg">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="F7s-7m-uhL">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<customFonts key="customFonts">
|
||||
<array key="OpenSans-Light.ttf">
|
||||
<string>OpenSans-Light</string>
|
||||
</array>
|
||||
<array key="OpenSans-Regular.ttf">
|
||||
<string>OpenSans</string>
|
||||
</array>
|
||||
<array key="OpenSans-Semibold.ttf">
|
||||
<string>OpenSans-Semibold</string>
|
||||
</array>
|
||||
</customFonts>
|
||||
<scenes>
|
||||
<!--Main Table View Controller-->
|
||||
<scene sceneID="Q2d-BE-geS">
|
||||
<objects>
|
||||
<tableViewController storyboardIdentifier="MainTableViewController" id="0cn-rv-Emg" customClass="MainTableViewController" customModule="FoldingCell_Demo" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="667" sectionHeaderHeight="28" sectionFooterHeight="28" id="MwZ-K3-six">
|
||||
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="prototypes" style="grouped" separatorStyle="none" rowHeight="667" sectionHeaderHeight="18" sectionFooterHeight="18" id="MwZ-K3-six">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="708"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
|
||||
<color key="sectionIndexBackgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<prototypes>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="FoldingCell" rowHeight="667" id="fgm-B1-nUi" customClass="DemoCell" customModule="FoldingCell_Demo" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="28" width="600" height="667"/>
|
||||
<rect key="frame" x="0.0" y="55.5" width="600" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="fgm-B1-nUi" id="MxP-E5-nua">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="667"/>
|
||||
@@ -381,7 +370,7 @@
|
||||
<rect key="frame" x="79" y="50.5" width="97" height="17"/>
|
||||
</imageView>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="photo" translatesAutoresizingMaskIntoConstraints="NO" id="Nm8-JU-yEj" userLabel="photo">
|
||||
<rect key="frame" x="22" y="28" width="49" height="49"/>
|
||||
<rect key="frame" x="22" y="28" width="49.000000000000028" height="49.000000000000028"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="49" id="JNu-y1-BLY"/>
|
||||
<constraint firstAttribute="width" constant="49" id="qpi-cG-s4a"/>
|
||||
@@ -693,19 +682,38 @@
|
||||
<outlet property="delegate" destination="0cn-rv-Emg" id="o83-eX-gao"/>
|
||||
</connections>
|
||||
</tableView>
|
||||
<navigationItem key="navigationItem" id="Nrx-NB-MRU"/>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<size key="freeformSize" width="600" height="708"/>
|
||||
</tableViewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="WxO-6i-Q9B" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="43" y="296"/>
|
||||
<point key="canvasLocation" x="980.79999999999995" y="295.95202398800603"/>
|
||||
</scene>
|
||||
<!--Navigation Controller-->
|
||||
<scene sceneID="vcD-Fk-7r9">
|
||||
<objects>
|
||||
<navigationController automaticallyAdjustsScrollViewInsets="NO" id="F7s-7m-uhL" sceneMemberID="viewController">
|
||||
<toolbarItems/>
|
||||
<navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="sRx-TU-YI7">
|
||||
<rect key="frame" x="0.0" y="20" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</navigationBar>
|
||||
<nil name="viewControllers"/>
|
||||
<connections>
|
||||
<segue destination="0cn-rv-Emg" kind="relationship" relationship="rootViewController" id="ibO-U9-Alo"/>
|
||||
</connections>
|
||||
</navigationController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="XoX-zC-yNs" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="42.399999999999999" y="295.50224887556226"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<image name="arrow" width="16" height="25"/>
|
||||
<image name="burger" width="38" height="29"/>
|
||||
<image name="dots" width="14" height="84"/>
|
||||
<image name="image" width="340" height="165"/>
|
||||
<image name="image" width="340.5" height="165"/>
|
||||
<image name="photo" width="98" height="98"/>
|
||||
<image name="stars" width="97" height="17"/>
|
||||
</resources>
|
||||
|
||||
@@ -26,30 +26,65 @@ import UIKit
|
||||
|
||||
class MainTableViewController: UITableViewController {
|
||||
|
||||
let kCloseCellHeight: CGFloat = 179
|
||||
let kOpenCellHeight: CGFloat = 488
|
||||
let kRowsCount = 10
|
||||
var cellHeights: [CGFloat] = []
|
||||
enum Const {
|
||||
static let closeCellHeight: CGFloat = 179
|
||||
static let openCellHeight: CGFloat = 488
|
||||
static let rowsCount = 10
|
||||
static let sectionCount = 5
|
||||
}
|
||||
|
||||
private var cellHeights: [[CGFloat]] = (0..<Const.sectionCount).map { _ in Array(repeating: Const.closeCellHeight, count: Const.rowsCount) }
|
||||
|
||||
// MARK: Life Cycle
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
setup()
|
||||
tableView.sectionFooterHeight = 0
|
||||
}
|
||||
|
||||
// MARK: Helpers
|
||||
private func setup() {
|
||||
cellHeights = Array(repeating: kCloseCellHeight, count: kRowsCount)
|
||||
tableView.estimatedRowHeight = kCloseCellHeight
|
||||
tableView.rowHeight = UITableViewAutomaticDimension
|
||||
tableView.estimatedRowHeight = Const.closeCellHeight
|
||||
tableView.rowHeight = UITableView.automaticDimension
|
||||
tableView.backgroundColor = UIColor(patternImage: #imageLiteral(resourceName: "background"))
|
||||
if #available(iOS 10.0, *) {
|
||||
tableView.refreshControl = UIRefreshControl()
|
||||
tableView.refreshControl?.addTarget(self, action: #selector(refreshHandler), for: .valueChanged)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: Actions
|
||||
@objc func refreshHandler() {
|
||||
let deadlineTime = DispatchTime.now() + .seconds(1)
|
||||
DispatchQueue.main.asyncAfter(deadline: deadlineTime, execute: { [weak self] in
|
||||
if #available(iOS 10.0, *) {
|
||||
self?.tableView.refreshControl?.endRefreshing()
|
||||
}
|
||||
self?.tableView.reloadData()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - TableView
|
||||
|
||||
extension MainTableViewController {
|
||||
|
||||
override func numberOfSections(in tableView: UITableView) -> Int {
|
||||
return cellHeights.count
|
||||
}
|
||||
|
||||
override func tableView(_: UITableView, numberOfRowsInSection _: Int) -> Int {
|
||||
return 10
|
||||
override func tableView(_: UITableView, numberOfRowsInSection section: Int) -> Int {
|
||||
return cellHeights[section].count
|
||||
}
|
||||
|
||||
override func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
|
||||
let view = UIView()
|
||||
view.backgroundColor = .red
|
||||
return view
|
||||
}
|
||||
|
||||
override func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
|
||||
return 44
|
||||
}
|
||||
|
||||
override func tableView(_: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) {
|
||||
@@ -59,7 +94,7 @@ extension MainTableViewController {
|
||||
|
||||
cell.backgroundColor = .clear
|
||||
|
||||
if cellHeights[indexPath.row] == kCloseCellHeight {
|
||||
if cellHeights[indexPath.section][indexPath.row] == Const.closeCellHeight {
|
||||
cell.unfold(false, animated: false, completion: nil)
|
||||
} else {
|
||||
cell.unfold(true, animated: false, completion: nil)
|
||||
@@ -77,7 +112,7 @@ extension MainTableViewController {
|
||||
}
|
||||
|
||||
override func tableView(_: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
|
||||
return cellHeights[indexPath.row]
|
||||
return cellHeights[indexPath.section][indexPath.row]
|
||||
}
|
||||
|
||||
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
|
||||
@@ -89,13 +124,13 @@ extension MainTableViewController {
|
||||
}
|
||||
|
||||
var duration = 0.0
|
||||
let cellIsCollapsed = cellHeights[indexPath.row] == kCloseCellHeight
|
||||
let cellIsCollapsed = cellHeights[indexPath.section][indexPath.row] == Const.closeCellHeight
|
||||
if cellIsCollapsed {
|
||||
cellHeights[indexPath.row] = kOpenCellHeight
|
||||
cellHeights[indexPath.section][indexPath.row] = Const.openCellHeight
|
||||
cell.unfold(true, animated: true, completion: nil)
|
||||
duration = 0.5
|
||||
} else {
|
||||
cellHeights[indexPath.row] = kCloseCellHeight
|
||||
cellHeights[indexPath.section][indexPath.row] = Const.closeCellHeight
|
||||
cell.unfold(false, animated: true, completion: nil)
|
||||
duration = 0.8
|
||||
}
|
||||
@@ -103,6 +138,11 @@ extension MainTableViewController {
|
||||
UIView.animate(withDuration: duration, delay: 0, options: .curveEaseOut, animations: { () -> Void in
|
||||
tableView.beginUpdates()
|
||||
tableView.endUpdates()
|
||||
|
||||
// fix https://github.com/Ramotion/folding-cell/issues/169
|
||||
if cell.frame.maxY > tableView.frame.maxY {
|
||||
tableView.scrollToRow(at: indexPath, at: UITableView.ScrollPosition.bottom, animated: true)
|
||||
}
|
||||
}, completion: nil)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12120" systemVersion="16F73" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="0cn-rv-Emg">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="0cn-rv-Emg">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12088"/>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<customFonts key="customFonts">
|
||||
@@ -22,7 +23,7 @@
|
||||
<!--Item-->
|
||||
<scene sceneID="Q2d-BE-geS">
|
||||
<objects>
|
||||
<tableViewController storyboardIdentifier="TableViewController" id="0cn-rv-Emg" customClass="TableViewController" sceneMemberID="viewController">
|
||||
<tableViewController storyboardIdentifier="TableViewController" id="0cn-rv-Emg" customClass="MainTableViewController" customModule="FoldingCell_Demo" sceneMemberID="viewController">
|
||||
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="667" sectionHeaderHeight="28" sectionFooterHeight="28" id="MwZ-K3-six">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
|
||||
@@ -59,9 +59,12 @@
|
||||
NSNumber *height = [self.cellHeights objectAtIndex:indexPath.row];
|
||||
bool cellIsCollapsed = height.floatValue == self.kCloseCellHeight;
|
||||
if (cellIsCollapsed) {
|
||||
[(FoldingCell *) cell selectedAnimation:false animated:false completion: nil];
|
||||
|
||||
[(FoldingCell *)cell unfold:NO animated:NO completion:nil];
|
||||
//[(FoldingCell *) cell selectedAnimation:false animated:false completion: nil];
|
||||
} else {
|
||||
[(FoldingCell *) cell selectedAnimation:true animated:false completion: nil];
|
||||
[(FoldingCell *)cell unfold:YES animated:NO completion:nil];
|
||||
//[(FoldingCell *) cell selectedAnimation:true animated:false completion: nil];
|
||||
}
|
||||
|
||||
UIView *backgroundTopView = [cell viewWithTag:11];
|
||||
@@ -108,11 +111,13 @@
|
||||
bool cellIsCollapsed = height.floatValue == self.kCloseCellHeight;
|
||||
if (cellIsCollapsed) {
|
||||
[self.cellHeights setObject:[NSNumber numberWithFloat:self.kOpenCellHeight] atIndexedSubscript:indexPath.row];
|
||||
[cell selectedAnimation:true animated:true completion: nil];
|
||||
//[cell selectedAnimation:true animated:true completion: nil];
|
||||
[cell unfold:YES animated:YES completion:nil];
|
||||
duration = 0.5;
|
||||
} else {
|
||||
[self.cellHeights setObject:[NSNumber numberWithFloat:self.kCloseCellHeight] atIndexedSubscript:indexPath.row];
|
||||
[cell selectedAnimation:false animated:true completion: nil];
|
||||
//[cell selectedAnimation:false animated:true completion: nil];
|
||||
[cell unfold:NO animated:YES completion:nil];
|
||||
duration = 0.8;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
8498513F1C5639F9006FA400 /* FoldingCellTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8498513E1C5639F9006FA400 /* FoldingCellTests.swift */; };
|
||||
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 */; };
|
||||
@@ -29,6 +30,13 @@
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
5A0E1C3221414940006A0374 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 847A57FC1C294F750028FB84 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 9D57F31B1EDC7A6F0004599F;
|
||||
remoteInfo = "FoldingCell-Demo";
|
||||
};
|
||||
9D57F3361EDC7AD80004599F /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 847A57FC1C294F750028FB84 /* Project object */;
|
||||
@@ -71,9 +79,10 @@
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
8498513C1C5639F9006FA400 /* FoldingCellTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FoldingCellTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
8498513E1C5639F9006FA400 /* FoldingCellTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FoldingCellTests.swift; sourceTree = "<group>"; };
|
||||
849851401C5639F9006FA400 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
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>"; };
|
||||
@@ -99,7 +108,7 @@
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
849851391C5639F9006FA400 /* Frameworks */ = {
|
||||
5A0E1C2A21414940006A0374 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
@@ -132,13 +141,23 @@
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
5A0E1C2E21414940006A0374 /* FoldingCellDemoTests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
5A0E1C2F21414940006A0374 /* FoldingCellDemoTests.swift */,
|
||||
5A0E1C3121414940006A0374 /* Info.plist */,
|
||||
5A1225D721B65E8E005BBB26 /* RotationViewTests.swift */,
|
||||
);
|
||||
path = FoldingCellDemoTests;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
847A57FB1C294F750028FB84 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8499D8861D0054A8004B5B37 /* FoldingCell */,
|
||||
8498513D1C5639F9006FA400 /* FoldingCellTests */,
|
||||
9D57F31D1EDC7A6F0004599F /* FoldingCell-Demo */,
|
||||
9DAA51551EDDBAD700DFC539 /* FoldingCell-DemoObjc */,
|
||||
5A0E1C2E21414940006A0374 /* FoldingCellDemoTests */,
|
||||
847A58051C294F750028FB84 /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
@@ -146,23 +165,14 @@
|
||||
847A58051C294F750028FB84 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8498513C1C5639F9006FA400 /* FoldingCellTests.xctest */,
|
||||
8499D8851D0054A8004B5B37 /* FoldingCell.framework */,
|
||||
9D57F31C1EDC7A6F0004599F /* FoldingCell-Demo.app */,
|
||||
9DAA51541EDDBAD700DFC539 /* FoldingCell-DemoObjc.app */,
|
||||
5A0E1C2D21414940006A0374 /* FoldingCellDemoTests.xctest */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8498513D1C5639F9006FA400 /* FoldingCellTests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8498513E1C5639F9006FA400 /* FoldingCellTests.swift */,
|
||||
849851401C5639F9006FA400 /* Info.plist */,
|
||||
);
|
||||
path = FoldingCellTests;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8499D8861D0054A8004B5B37 /* FoldingCell */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -225,21 +235,22 @@
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
8498513B1C5639F9006FA400 /* FoldingCellTests */ = {
|
||||
5A0E1C2C21414940006A0374 /* FoldingCellDemoTests */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 849851431C5639F9006FA400 /* Build configuration list for PBXNativeTarget "FoldingCellTests" */;
|
||||
buildConfigurationList = 5A0E1C3421414940006A0374 /* Build configuration list for PBXNativeTarget "FoldingCellDemoTests" */;
|
||||
buildPhases = (
|
||||
849851381C5639F9006FA400 /* Sources */,
|
||||
849851391C5639F9006FA400 /* Frameworks */,
|
||||
8498513A1C5639F9006FA400 /* Resources */,
|
||||
5A0E1C2921414940006A0374 /* Sources */,
|
||||
5A0E1C2A21414940006A0374 /* Frameworks */,
|
||||
5A0E1C2B21414940006A0374 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
5A0E1C3321414940006A0374 /* PBXTargetDependency */,
|
||||
);
|
||||
name = FoldingCellTests;
|
||||
productName = FoldingCellTests;
|
||||
productReference = 8498513C1C5639F9006FA400 /* FoldingCellTests.xctest */;
|
||||
name = FoldingCellDemoTests;
|
||||
productName = FoldingCellDemoTests;
|
||||
productReference = 5A0E1C2D21414940006A0374 /* FoldingCellDemoTests.xctest */;
|
||||
productType = "com.apple.product-type.bundle.unit-test";
|
||||
};
|
||||
8499D8841D0054A8004B5B37 /* FoldingCell */ = {
|
||||
@@ -304,25 +315,25 @@
|
||||
847A57FC1C294F750028FB84 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastSwiftUpdateCheck = 0830;
|
||||
LastUpgradeCheck = 0920;
|
||||
LastSwiftUpdateCheck = 0940;
|
||||
LastUpgradeCheck = 1020;
|
||||
ORGANIZATIONNAME = "Alex K.";
|
||||
TargetAttributes = {
|
||||
8498513B1C5639F9006FA400 = {
|
||||
CreatedOnToolsVersion = 7.2;
|
||||
DevelopmentTeam = 2VFCBFYPFW;
|
||||
LastSwiftMigration = 0800;
|
||||
TestTargetID = 847A58031C294F750028FB84;
|
||||
5A0E1C2C21414940006A0374 = {
|
||||
CreatedOnToolsVersion = 9.4;
|
||||
LastSwiftMigration = 1020;
|
||||
ProvisioningStyle = Automatic;
|
||||
TestTargetID = 9D57F31B1EDC7A6F0004599F;
|
||||
};
|
||||
8499D8841D0054A8004B5B37 = {
|
||||
CreatedOnToolsVersion = 7.3.1;
|
||||
DevelopmentTeam = LEAZS7L33U;
|
||||
LastSwiftMigration = 0830;
|
||||
LastSwiftMigration = 1020;
|
||||
};
|
||||
9D57F31B1EDC7A6F0004599F = {
|
||||
CreatedOnToolsVersion = 8.3.2;
|
||||
DevelopmentTeam = 34MUF9YXTA;
|
||||
LastSwiftMigration = 0920;
|
||||
DevelopmentTeam = LEAZS7L33U;
|
||||
LastSwiftMigration = 1020;
|
||||
ProvisioningStyle = Automatic;
|
||||
};
|
||||
9DAA51531EDDBAD700DFC539 = {
|
||||
@@ -334,7 +345,7 @@
|
||||
};
|
||||
buildConfigurationList = 847A57FF1C294F750028FB84 /* Build configuration list for PBXProject "FoldingCell" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
@@ -348,13 +359,13 @@
|
||||
8499D8841D0054A8004B5B37 /* FoldingCell */,
|
||||
9D57F31B1EDC7A6F0004599F /* FoldingCell-Demo */,
|
||||
9DAA51531EDDBAD700DFC539 /* FoldingCell-DemoObjc */,
|
||||
8498513B1C5639F9006FA400 /* FoldingCellTests */,
|
||||
5A0E1C2C21414940006A0374 /* FoldingCellDemoTests */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
8498513A1C5639F9006FA400 /* Resources */ = {
|
||||
5A0E1C2B21414940006A0374 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
@@ -391,11 +402,12 @@
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
849851381C5639F9006FA400 /* Sources */ = {
|
||||
5A0E1C2921414940006A0374 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8498513F1C5639F9006FA400 /* FoldingCellTests.swift in Sources */,
|
||||
5A1225D821B65E8E005BBB26 /* RotationViewTests.swift in Sources */,
|
||||
5A0E1C3021414940006A0374 /* FoldingCellDemoTests.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -430,6 +442,11 @@
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
5A0E1C3321414940006A0374 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 9D57F31B1EDC7A6F0004599F /* FoldingCell-Demo */;
|
||||
targetProxy = 5A0E1C3221414940006A0374 /* PBXContainerItemProxy */;
|
||||
};
|
||||
9D57F3371EDC7AD80004599F /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 8499D8841D0054A8004B5B37 /* FoldingCell */;
|
||||
@@ -478,10 +495,58 @@
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
5A0E1C3521414940006A0374 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
INFOPLIST_FILE = FoldingCellDemoTests/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.ramotion.FoldingCellDemoTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/FoldingCell-Demo.app/FoldingCell-Demo";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
5A0E1C3621414940006A0374 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
INFOPLIST_FILE = FoldingCellDemoTests/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.ramotion.FoldingCellDemoTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/FoldingCell-Demo.app/FoldingCell-Demo";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
847A58141C294F750028FB84 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
@@ -490,12 +555,14 @@
|
||||
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_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;
|
||||
@@ -522,7 +589,7 @@
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.2;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
@@ -534,6 +601,7 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
@@ -542,12 +610,14 @@
|
||||
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_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;
|
||||
@@ -568,7 +638,7 @@
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.2;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||
@@ -576,36 +646,6 @@
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
849851441C5639F9006FA400 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = 2VFCBFYPFW;
|
||||
INFOPLIST_FILE = FoldingCellTests/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.ramotion.FoldingCellTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 3.0;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/FoldingCellDemo.app/FoldingCellDemo";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
849851451C5639F9006FA400 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = 2VFCBFYPFW;
|
||||
INFOPLIST_FILE = FoldingCellTests/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.ramotion.FoldingCellTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 3.0;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/FoldingCellDemo.app/FoldingCellDemo";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
8499D88F1D0054A8004B5B37 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
@@ -627,7 +667,7 @@
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 4.0;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
@@ -654,7 +694,7 @@
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.ramotion.FoldingCell;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_VERSION = 4.0;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
@@ -671,16 +711,15 @@
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
DEVELOPMENT_TEAM = 34MUF9YXTA;
|
||||
DEVELOPMENT_TEAM = LEAZS7L33U;
|
||||
INFOPLIST_FILE = "FoldingCell-Demo/Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "ramotion.com.FoldingCell-Demo";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "ramotion.com.FoldingCell-Demo-ser";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
|
||||
SWIFT_VERSION = 4.0;
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
@@ -694,15 +733,14 @@
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
DEVELOPMENT_TEAM = 34MUF9YXTA;
|
||||
DEVELOPMENT_TEAM = LEAZS7L33U;
|
||||
INFOPLIST_FILE = "FoldingCell-Demo/Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "ramotion.com.FoldingCell-Demo";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "ramotion.com.FoldingCell-Demo-ser";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
|
||||
SWIFT_VERSION = 4.0;
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
@@ -749,6 +787,15 @@
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
5A0E1C3421414940006A0374 /* Build configuration list for PBXNativeTarget "FoldingCellDemoTests" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
5A0E1C3521414940006A0374 /* Debug */,
|
||||
5A0E1C3621414940006A0374 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
847A57FF1C294F750028FB84 /* Build configuration list for PBXProject "FoldingCell" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
@@ -758,15 +805,6 @@
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
849851431C5639F9006FA400 /* Build configuration list for PBXNativeTarget "FoldingCellTests" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
849851441C5639F9006FA400 /* Debug */,
|
||||
849851451C5639F9006FA400 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
8499D88E1D0054A8004B5B37 /* Build configuration list for PBXNativeTarget "FoldingCell" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0920"
|
||||
LastUpgradeVersion = "1020"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
@@ -26,10 +26,28 @@
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
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>
|
||||
@@ -37,7 +55,6 @@
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
|
||||
@@ -26,7 +26,9 @@ import UIKit
|
||||
/// UITableViewCell with folding animation
|
||||
open class FoldingCell: UITableViewCell {
|
||||
|
||||
/// UIView whitch display when cell open
|
||||
@objc open var isUnfolded = false
|
||||
|
||||
/// UIView is displayed when cell open
|
||||
@IBOutlet open var containerView: UIView!
|
||||
@IBOutlet open var containerViewTop: NSLayoutConstraint!
|
||||
|
||||
@@ -49,7 +51,7 @@ open class FoldingCell: UITableViewCell {
|
||||
- Open: Open direction
|
||||
- Close: Close direction
|
||||
*/
|
||||
public enum AnimationType {
|
||||
@objc public enum AnimationType : Int {
|
||||
case open
|
||||
case close
|
||||
}
|
||||
@@ -65,7 +67,7 @@ open class FoldingCell: UITableViewCell {
|
||||
/**
|
||||
Call this method in methods init(style: UITableViewCellStyle, reuseIdentifier: String?) after creating Views
|
||||
*/
|
||||
open func commonInit() {
|
||||
@objc open func commonInit() {
|
||||
configureDefaultState()
|
||||
|
||||
selectionStyle = .none
|
||||
@@ -76,7 +78,7 @@ open class FoldingCell: UITableViewCell {
|
||||
|
||||
// MARK: configure
|
||||
|
||||
func configureDefaultState() {
|
||||
private func configureDefaultState() {
|
||||
|
||||
guard let foregroundViewTop = self.foregroundViewTop,
|
||||
let containerViewTop = self.containerViewTop else {
|
||||
@@ -93,17 +95,18 @@ open class FoldingCell: UITableViewCell {
|
||||
foregroundView.layer.transform = foregroundView.transform3d()
|
||||
|
||||
createAnimationView()
|
||||
contentView.bringSubview(toFront: foregroundView)
|
||||
contentView.bringSubviewToFront(foregroundView)
|
||||
}
|
||||
|
||||
func createAnimationItemView() -> [RotatedView] {
|
||||
private func createAnimationItemView() -> [RotatedView] {
|
||||
|
||||
var items = [RotatedView]()
|
||||
items.append(foregroundView)
|
||||
var rotatedViews = [RotatedView]()
|
||||
|
||||
animationView?.subviews
|
||||
.flatMap({ $0 as? RotatedView })
|
||||
.lazy
|
||||
.compactMap({ $0 as? RotatedView })
|
||||
.sorted(by: { $0.tag < $1.tag })
|
||||
.forEach { itemView in
|
||||
rotatedViews.append(itemView)
|
||||
@@ -118,22 +121,18 @@ open class FoldingCell: UITableViewCell {
|
||||
|
||||
func configureAnimationItems(_ animationType: AnimationType) {
|
||||
|
||||
guard let animationViewSuperView = animationView?.subviews else {
|
||||
fatalError()
|
||||
}
|
||||
|
||||
if animationType == .open {
|
||||
for view in animationViewSuperView.filter({ $0 is RotatedView }) {
|
||||
view.alpha = 0
|
||||
}
|
||||
animationView?.subviews
|
||||
.lazy
|
||||
.compactMap { $0 as? RotatedView }
|
||||
.forEach { $0.alpha = 0 }
|
||||
} else {
|
||||
for case let view as RotatedView in animationViewSuperView.filter({ $0 is RotatedView }) {
|
||||
if animationType == .open {
|
||||
view.alpha = 0
|
||||
} else {
|
||||
view.alpha = 1
|
||||
view.backView?.alpha = 0
|
||||
}
|
||||
animationView?.subviews
|
||||
.lazy
|
||||
.compactMap { $0 as? RotatedView }
|
||||
.forEach {
|
||||
$0.alpha = animationType == .open ? 0 : 1
|
||||
if animationType != .open { $0.backView?.alpha = 0 }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -185,14 +184,14 @@ open class FoldingCell: UITableViewCell {
|
||||
let foregroundViewSize = foregroundView.bounds.size
|
||||
|
||||
// added first item
|
||||
var image = containerView.pb_takeSnapshot(CGRect(x: 0, y: 0, width: containerViewSize.width, height: foregroundViewSize.height))
|
||||
var image = containerView.takeSnapshot(CGRect(x: 0, y: 0, width: containerViewSize.width, height: foregroundViewSize.height))
|
||||
var imageView = UIImageView(image: image)
|
||||
imageView.tag = 0
|
||||
imageView.layer.cornerRadius = foregroundView.layer.cornerRadius
|
||||
animationView?.addSubview(imageView)
|
||||
|
||||
// added secod item
|
||||
image = containerView.pb_takeSnapshot(CGRect(x: 0, y: foregroundViewSize.height, width: containerViewSize.width, height: foregroundViewSize.height))
|
||||
image = containerView.takeSnapshot(CGRect(x: 0, y: foregroundViewSize.height, width: containerViewSize.width, height: foregroundViewSize.height))
|
||||
|
||||
imageView = UIImageView(image: image)
|
||||
let rotatedView = RotatedView(frame: imageView.frame)
|
||||
@@ -218,7 +217,7 @@ open class FoldingCell: UITableViewCell {
|
||||
var yPosition = 2 * foregroundViewSize.height
|
||||
var tag = 2
|
||||
for _ in 2 ..< itemCount {
|
||||
image = containerView.pb_takeSnapshot(CGRect(x: 0, y: yPosition, width: containerViewSize.width, height: itemHeight))
|
||||
image = containerView.takeSnapshot(CGRect(x: 0, y: yPosition, width: containerViewSize.width, height: itemHeight))
|
||||
|
||||
imageView = UIImageView(image: image)
|
||||
let rotatedView = RotatedView(frame: imageView.frame)
|
||||
@@ -265,7 +264,7 @@ open class FoldingCell: UITableViewCell {
|
||||
/// - value: unfold = true; collapse = false.
|
||||
/// - animated: animate changes.
|
||||
/// - completion: A block object to be executed when the animation sequence ends.
|
||||
open func unfold(_ value: Bool, animated: Bool = true, completion: (() -> Void)? = nil) {
|
||||
@objc open func unfold(_ value: Bool, animated: Bool = true, completion: (() -> Void)? = nil) {
|
||||
if animated {
|
||||
value ? openAnimation(completion) : closeAnimation(completion)
|
||||
} else {
|
||||
@@ -274,20 +273,18 @@ open class FoldingCell: UITableViewCell {
|
||||
}
|
||||
}
|
||||
|
||||
open func isAnimating() -> Bool {
|
||||
@objc open func isAnimating() -> Bool {
|
||||
return animationView?.alpha == 1 ? true : false
|
||||
}
|
||||
|
||||
open var isUnfolded = false
|
||||
|
||||
// MARK: Animations
|
||||
|
||||
open func animationDuration(_ itemIndex: NSInteger, type: AnimationType) -> TimeInterval {
|
||||
@objc open dynamic func animationDuration(_ itemIndex: NSInteger, type: AnimationType) -> TimeInterval {
|
||||
return type == .close ? durationsForCollapsedState[itemIndex] : durationsForExpandedState[itemIndex]
|
||||
}
|
||||
|
||||
open var durationsForExpandedState: [TimeInterval] = []
|
||||
open var durationsForCollapsedState: [TimeInterval] = []
|
||||
@objc open var durationsForExpandedState: [TimeInterval] = []
|
||||
@objc open var durationsForCollapsedState: [TimeInterval] = []
|
||||
|
||||
func durationSequence(_ type: AnimationType) -> [TimeInterval] {
|
||||
var durations = [TimeInterval]()
|
||||
@@ -310,7 +307,7 @@ open class FoldingCell: UITableViewCell {
|
||||
let durations = durationSequence(.open)
|
||||
|
||||
var delay: TimeInterval = 0
|
||||
var timing = kCAMediaTimingFunctionEaseIn
|
||||
var timing = convertFromCAMediaTimingFunctionName(CAMediaTimingFunctionName.easeIn)
|
||||
var from: CGFloat = 0.0
|
||||
var to: CGFloat = -CGFloat.pi / 2
|
||||
var hidden = true
|
||||
@@ -327,7 +324,7 @@ open class FoldingCell: UITableViewCell {
|
||||
|
||||
from = from == 0.0 ? CGFloat.pi / 2 : 0.0
|
||||
to = to == 0.0 ? -CGFloat.pi / 2 : 0.0
|
||||
timing = timing == kCAMediaTimingFunctionEaseIn ? kCAMediaTimingFunctionEaseOut : kCAMediaTimingFunctionEaseIn
|
||||
timing = timing == convertFromCAMediaTimingFunctionName(CAMediaTimingFunctionName.easeIn) ? convertFromCAMediaTimingFunctionName(CAMediaTimingFunctionName.easeOut) : convertFromCAMediaTimingFunctionName(CAMediaTimingFunctionName.easeIn)
|
||||
hidden = !hidden
|
||||
delay += durations[index]
|
||||
}
|
||||
@@ -361,7 +358,7 @@ open class FoldingCell: UITableViewCell {
|
||||
var durations: [TimeInterval] = durationSequence(.close).reversed()
|
||||
|
||||
var delay: TimeInterval = 0
|
||||
var timing = kCAMediaTimingFunctionEaseIn
|
||||
var timing = convertFromCAMediaTimingFunctionName(CAMediaTimingFunctionName.easeIn)
|
||||
var from: CGFloat = 0.0
|
||||
var to: CGFloat = CGFloat.pi / 2
|
||||
var hidden = true
|
||||
@@ -377,7 +374,7 @@ open class FoldingCell: UITableViewCell {
|
||||
|
||||
to = to == 0.0 ? CGFloat.pi / 2 : 0.0
|
||||
from = from == 0.0 ? -CGFloat.pi / 2 : 0.0
|
||||
timing = timing == kCAMediaTimingFunctionEaseIn ? kCAMediaTimingFunctionEaseOut : kCAMediaTimingFunctionEaseIn
|
||||
timing = timing == convertFromCAMediaTimingFunctionName(CAMediaTimingFunctionName.easeIn) ? convertFromCAMediaTimingFunctionName(CAMediaTimingFunctionName.easeOut) : convertFromCAMediaTimingFunctionName(CAMediaTimingFunctionName.easeIn)
|
||||
hidden = !hidden
|
||||
delay += durations[index]
|
||||
}
|
||||
@@ -402,6 +399,12 @@ open class FoldingCell: UITableViewCell {
|
||||
// MARK: RotatedView
|
||||
|
||||
open class RotatedView: UIView {
|
||||
|
||||
private enum Const {
|
||||
static let rotationX = "rotation.x"
|
||||
static let transformRotationX = "transform.rotation.x"
|
||||
}
|
||||
|
||||
var hiddenAfterAnimation = false
|
||||
var backView: RotatedView?
|
||||
|
||||
@@ -448,19 +451,19 @@ extension RotatedView: CAAnimationDelegate {
|
||||
|
||||
func foldingAnimation(_ timing: String, from: CGFloat, to: CGFloat, duration: TimeInterval, delay: TimeInterval, hidden: Bool) {
|
||||
|
||||
let rotateAnimation = CABasicAnimation(keyPath: "transform.rotation.x")
|
||||
rotateAnimation.timingFunction = CAMediaTimingFunction(name: timing)
|
||||
let rotateAnimation = CABasicAnimation(keyPath: Const.transformRotationX)
|
||||
rotateAnimation.timingFunction = CAMediaTimingFunction(name: convertToCAMediaTimingFunctionName(timing))
|
||||
rotateAnimation.fromValue = from
|
||||
rotateAnimation.toValue = to
|
||||
rotateAnimation.duration = duration
|
||||
rotateAnimation.delegate = self
|
||||
rotateAnimation.fillMode = kCAFillModeForwards
|
||||
rotateAnimation.fillMode = CAMediaTimingFillMode.forwards
|
||||
rotateAnimation.isRemovedOnCompletion = false
|
||||
rotateAnimation.beginTime = CACurrentMediaTime() + delay
|
||||
|
||||
self.hiddenAfterAnimation = hidden
|
||||
|
||||
self.layer.add(rotateAnimation, forKey: "rotation.x")
|
||||
self.layer.add(rotateAnimation, forKey: Const.rotationX)
|
||||
}
|
||||
|
||||
public func animationDidStart(_: CAAnimation) {
|
||||
@@ -478,9 +481,10 @@ extension RotatedView: CAAnimationDelegate {
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: UIView + extension
|
||||
private extension UIView {
|
||||
|
||||
func pb_takeSnapshot(_ frame: CGRect) -> UIImage? {
|
||||
func takeSnapshot(_ frame: CGRect) -> UIImage? {
|
||||
UIGraphicsBeginImageContextWithOptions(frame.size, false, 0)
|
||||
|
||||
guard let context = UIGraphicsGetCurrentContext() else { return nil }
|
||||
@@ -493,3 +497,13 @@ private extension UIView {
|
||||
return image
|
||||
}
|
||||
}
|
||||
|
||||
// Helper function inserted by Swift 4.2 migrator.
|
||||
fileprivate func convertFromCAMediaTimingFunctionName(_ input: CAMediaTimingFunctionName) -> String {
|
||||
return input.rawValue
|
||||
}
|
||||
|
||||
// Helper function inserted by Swift 4.2 migrator.
|
||||
fileprivate func convertToCAMediaTimingFunctionName(_ input: String) -> CAMediaTimingFunctionName {
|
||||
return CAMediaTimingFunctionName(rawValue: input)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
import XCTest
|
||||
import UIKit
|
||||
@testable import FoldingCell
|
||||
@testable import FoldingCell_Demo
|
||||
|
||||
class FoldingCellDemoTests: XCTestCase {
|
||||
|
||||
var foldingCell: FoldingCell!
|
||||
|
||||
override func setUp() {
|
||||
super.setUp()
|
||||
|
||||
let storyboard = UIStoryboard(name: "Main", bundle: nil)
|
||||
let vc = storyboard.instantiateViewController(withIdentifier: "MainTableViewController") as! MainTableViewController
|
||||
_ = vc.view
|
||||
foldingCell = vc.tableView.dequeueReusableCell(withIdentifier: "FoldingCell", for: IndexPath(row: 0, section: 0)) as? FoldingCell
|
||||
}
|
||||
|
||||
func testCreateFoldingCell() {
|
||||
XCTAssertNotNil(foldingCell)
|
||||
}
|
||||
|
||||
func testUnfold() {
|
||||
XCTAssertEqual(foldingCell.isUnfolded, false)
|
||||
foldingCell.unfold(true)
|
||||
XCTAssertEqual(foldingCell.isUnfolded, true)
|
||||
foldingCell.unfold(false)
|
||||
XCTAssertEqual(foldingCell.isUnfolded, false)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -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,33 +1,42 @@
|
||||

|
||||

|
||||
<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)
|
||||
[](https://travis-ci.org/Ramotion/folding-cell)
|
||||
[](https://codebeat.co/projects/github-com-ramotion-folding-cell)
|
||||
[](https://github.com/Carthage/Carthage)
|
||||
[](https://developer.apple.com/swift/)
|
||||
[](https://developer.apple.com/swift/)
|
||||
[](https://github.com/igrigorik/ga-beacon)
|
||||
|
||||
# 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="https://dev.ramotion.com/?utm_source=gthb&utm_medium=special&utm_campaign=folding-cell-contact-us">
|
||||
<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?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).
|
||||
[](https://paypal.me/Ramotion)
|
||||
|
||||
## Requirements
|
||||
|
||||
- iOS 8.0+
|
||||
- Xcode 9.0+
|
||||
- Xcode 10.2
|
||||
|
||||
## Installation
|
||||
|
||||
@@ -40,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
|
||||
@@ -72,7 +80,6 @@ Your result should be something like this picture:
|
||||
|
||||

|
||||
|
||||
[Demonstration adding constraints for foregroundView, containerView](https://vimeo.com/154954299)
|
||||
|
||||
4) Set ``` @IBInspectable var itemCount: NSInteger ``` property is a count of folding (it IBInspectable you can set in storyboard). range 2 or greater. Default value is 2
|
||||
|
||||
@@ -110,14 +117,14 @@ fileprivate struct C {
|
||||
}
|
||||
|
||||
var duration = 0.0
|
||||
if cellHeights[indexPath.row] == kCloseCellHeight { // open cell
|
||||
cellHeights[indexPath.row] = kOpenCellHeight
|
||||
cell.selectedAnimation(true, animated: true, completion: nil)
|
||||
if cellIsCollapsed {
|
||||
cellHeights[indexPath.row] = Const.openCellHeight
|
||||
cell.unfold(true, animated: true, completion: nil)
|
||||
duration = 0.5
|
||||
} else {// close cell
|
||||
cellHeights[indexPath.row] = kCloseCellHeight
|
||||
cell.selectedAnimation(false, animated: true, completion: nil)
|
||||
duration = 1.1
|
||||
} else {
|
||||
cellHeights[indexPath.row] = Const.closeCellHeight
|
||||
cell.unfold(false, animated: true, completion: nil)
|
||||
duration = 0.8
|
||||
}
|
||||
|
||||
UIView.animateWithDuration(duration, delay: 0, options: .CurveEaseOut, animations: { _ in
|
||||
@@ -155,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.
|
||||
|
||||
<br>
|
||||
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="https://dev.ramotion.com/?utm_source=gthb&utm_medium=special&utm_campaign=folding-cell-contact-us">
|
||||
<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 updates<br>
|
||||
<a href="https://goo.gl/rPFpid" >
|
||||
<img src="https://i.imgur.com/ziSqeSo.png/" width="156" height="28"></a>
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 14 MiB |
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 16 KiB |
Reference in New Issue
Block a user