Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
969de052b5 | ||
|
|
6bbb16b789 | ||
|
|
2f674a55aa | ||
|
|
4f0839691d | ||
|
|
400dbe0026 | ||
|
|
d4e153b429 | ||
|
|
099764c8a7 | ||
|
|
12802f304b | ||
|
|
acd221c9eb | ||
|
|
ea002f99fb | ||
|
|
6f78c54039 | ||
|
|
002d6158e6 | ||
|
|
fd443d5fb5 | ||
|
|
d8ded28b60 | ||
|
|
f32dca84ee | ||
|
|
f783526444 | ||
|
|
e4e75eb5c5 | ||
|
|
980dc63dd9 | ||
|
|
a0021618de | ||
|
|
7a931cb414 |
+1
-1
@@ -1,6 +1,6 @@
|
||||
Pod::Spec.new do |s|
|
||||
s.name = 'FoldingCell'
|
||||
s.version = '2.0.1'
|
||||
s.version = '2.0.3'
|
||||
s.summary = 'UITableViewCell with folding animation.'
|
||||
s.homepage = 'https://github.com/Ramotion/folding-cell'
|
||||
s.license = 'MIT'
|
||||
|
||||
@@ -177,7 +177,7 @@ open class FoldingCell: UITableViewCell {
|
||||
self.contentView.addConstraints(newConstraints)
|
||||
|
||||
for constraint in containerView.constraints { // added height constraint
|
||||
if constraint.firstAttribute == .height {
|
||||
if constraint.firstAttribute == .height, let item: UIView = constraint.firstItem as? UIView, item == containerView {
|
||||
let newConstraint = NSLayoutConstraint(item: animationView, attribute: constraint.firstAttribute,
|
||||
relatedBy: constraint.relation, toItem: nil, attribute: constraint.secondAttribute,
|
||||
multiplier: constraint.multiplier, constant: constraint.constant)
|
||||
@@ -217,11 +217,13 @@ open class FoldingCell: UITableViewCell {
|
||||
let itemHeight = (contSize.height - 2 * forgSize.height) / CGFloat(itemCount - 2)
|
||||
|
||||
if itemCount == 2 {
|
||||
// decrease containerView height or increase itemCount
|
||||
assert(contSize.height - 2 * forgSize.height == 0, "contanerView.height too high")
|
||||
// decrease containerView height or increase itemCount
|
||||
assert(contSize.height - 2 * forgSize.height == 0, "contanerView.height too high")
|
||||
}
|
||||
else{
|
||||
// decrease containerView height or increase itemCount
|
||||
assert(contSize.height - 2 * forgSize.height >= itemHeight, "contanerView.height too high")
|
||||
}
|
||||
// decrease containerView height or increase itemCount
|
||||
assert(contSize.height - 2 * forgSize.height >= itemHeight, "contanerView.height too high")
|
||||
|
||||
var yPosition = 2 * forgSize.height
|
||||
var tag = 2
|
||||
@@ -504,8 +506,8 @@ extension UIView {
|
||||
func pb_takeSnapshot(_ frame: CGRect) -> UIImage? {
|
||||
UIGraphicsBeginImageContextWithOptions(frame.size, false, 0.0)
|
||||
|
||||
let context = UIGraphicsGetCurrentContext();
|
||||
context!.translateBy(x: frame.origin.x * -1, y: frame.origin.y * -1)
|
||||
guard let context = UIGraphicsGetCurrentContext() else { return nil }
|
||||
context.translateBy(x: frame.origin.x * -1, y: frame.origin.y * -1)
|
||||
|
||||
guard let currentContext = UIGraphicsGetCurrentContext() else {
|
||||
return nil
|
||||
|
||||
@@ -34,7 +34,8 @@ class MainTableViewController: UITableViewController {
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
tableView.estimatedRowHeight = kCloseCellHeight
|
||||
tableView.rowHeight = UITableViewAutomaticDimension
|
||||
createCellHeightsArray()
|
||||
self.tableView.backgroundColor = UIColor(patternImage: UIImage(named: "background")!)
|
||||
}
|
||||
|
||||
@@ -12,12 +12,19 @@
|
||||
|
||||
## About
|
||||
This project is maintained by Ramotion, Inc.<br>
|
||||
We specialize in the designing and coding of custom UI for Mobile Apps and Websites.<br><br>**Looking for developers for your project?** [[▶︎CONTACT OUR TEAM◀︎](http://business.ramotion.com?utm_source=gthb&utm_medium=special&utm_campaign=foolding-cell-contact-us/#Get_in_Touch)]
|
||||
We specialize in the designing and coding of custom UI for Mobile Apps and Websites.<br><br>**Looking for developers for your project?**
|
||||
|
||||
<a href="https://business.ramotion.com?utm_source=gthb&utm_medium=special&utm_campaign=foolding-cell-contact-us/#Get_in_Touch" > <img src="https://github.com/Ramotion/navigation-stack/raw/master/contact_our_team@2x.png" width="150" height="30"></a>
|
||||
|
||||
[](https://dribbble.com/shots/2121350-Delivery-Card)
|
||||
|
||||
|
||||
The [iPhone mockup](https://store.ramotion.com/product/iphone-6-mockups?utm_source=gthb&utm_medium=special&utm_campaign=folding-cell) available [here](https://store.ramotion.com/product/iphone-6-mockups?utm_source=gthb&utm_medium=special&utm_campaign=folding-cell).
|
||||
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).
|
||||
|
||||
## Try this UI control in action
|
||||
|
||||
<a href="https://itunes.apple.com/app/apple-store/id1182360240?pt=550053&ct=gthb-folding-cell&mt=8" > <img src="https://github.com/Ramotion/navigation-stack/raw/master/Download_on_the_App_Store_Badge_US-UK_135x40.png" width="170" height="58"></a>
|
||||
|
||||
## Requirements
|
||||
|
||||
- iOS 8.0+
|
||||
@@ -28,11 +35,9 @@ The [iPhone mockup](https://store.ramotion.com/product/iphone-6-mockups?utm_sour
|
||||
Just add the FoldingCell.swift file to your project.
|
||||
|
||||
or use [CocoaPods](https://cocoapods.org) with Podfile:
|
||||
``` ruby
|
||||
pod 'FoldingCell' '~> 1.0.0' swift 2.2
|
||||
pod 'FoldingCell' '~> 2.0.1' swift 3
|
||||
```
|
||||
|
||||
pod 'FoldingCell', '~> 2.0.3'
|
||||
```
|
||||
or [Carthage](https://github.com/Carthage/Carthage) users can simply add Mantle to their `Cartfile`:
|
||||
```
|
||||
github "Ramotion/folding-cell"
|
||||
|
||||
Reference in New Issue
Block a user