Compare commits

..
17 Commits
Author SHA1 Message Date
Alex 969de052b5 Merge pull request #90 from dhiraj-das/DD_bugfix
folding animation does not update
2017-04-19 09:33:51 +03:00
Alex 6bbb16b789 Merge pull request #93 from LambdaDigamma/master
Remove force-unwrapped optional
2017-04-19 09:32:16 +03:00
Alex 2f674a55aa Merge pull request #104 from tangchunhin1628/master
Invalid container height check
2017-04-19 09:31:49 +03:00
Alex 4f0839691d Merge pull request #107 from zhongwuzw/master
bugFix: only copy containerView's height constraint
2017-04-19 09:29:19 +03:00
zhongwuzw 400dbe0026 bugFix: only copy containerView's height constraint 2017-04-18 23:21:24 +08:00
Juri Vasylenko d4e153b429 Update README.md 2017-04-05 20:00:19 +03:00
Adrian Tang 099764c8a7 Update FoldingCell.swift
Fixed the invalid check on container height when item count is 2.
2017-04-01 18:17:17 +08:00
Alex 12802f304b Merge pull request #102 from Sufi-Al-Hussaini/master
Fixed pod install entry in README.md
2017-03-21 09:27:28 +03:00
Shoaib Ahmed acd221c9eb Update README.md 2017-03-21 10:24:11 +04:00
Alex Mikhnev ea002f99fb Update README.md 2017-03-10 19:57:38 +03:00
Juri Vasylenko 6f78c54039 Update README.md 2017-02-17 17:57:42 +03:00
LambdaDigamma 002d6158e6 Remove force-unwrapped optional
Removed force-unwrapped optional causing a crash (found nil while
unwrapping optional) in pb_takeSnapshot ->
https://github.com/Ramotion/folding-cell/issues/89
2017-01-21 17:33:47 +01:00
Juri Vasylenko fd443d5fb5 Update README.md 2017-01-20 16:05:11 +03:00
Dhiraj Das d8ded28b60 folding animation does not update
incorrectly expanding the cell height below the selected cell.
2017-01-17 14:30:28 +05:30
aleksei1000000 f32dca84ee Update README.md 2017-01-10 17:15:58 +03:00
Alex f783526444 Update README.md 2016-12-05 14:33:39 +03:00
Alex.k e4e75eb5c5 update podspec and readme 2016-12-05 09:23:06 +03:00
4 changed files with 25 additions and 18 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'FoldingCell'
s.version = '2.0.2'
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,15 +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")
}
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")
// 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")
}
var yPosition = 2 * forgSize.height
var tag = 2
@@ -508,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 -4
View File
@@ -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>
[![Animation](https://raw.githubusercontent.com/Ramotion/folding-cell/master/Screenshots/folding-cell.gif)](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,8 +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:
pod 'FoldingCell' '~> 2.0.2'
```
pod 'FoldingCell', '~> 2.0.3'
```
or [Carthage](https://github.com/Carthage/Carthage) users can simply add Mantle to their `Cartfile`:
```
github "Ramotion/folding-cell"