Compare commits

...
4 Commits
Author SHA1 Message Date
Alex 5e5639f5d0 Merge pull request #130 from ohyes1h/master
Fix errors and warnings when migrating to swift 4
2017-10-23 09:18:10 +03:00
ohyes1h 02d5d8431d Fix errors and warnings when migrating to swift 4 2017-10-22 02:12:59 +08:00
Travis CI 1d20e0bd06 reorganize readme 2017-07-28 15:46:26 +03:00
Alex 4be8ef9b1d Update README.md 2017-06-27 11:47:41 +03:00
3 changed files with 30 additions and 21 deletions
@@ -614,7 +614,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
@@ -641,7 +641,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.ramotion.FoldingCell;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
@@ -777,6 +777,7 @@
9DAA51691EDDBAD700DFC539 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
+6 -6
View File
@@ -165,8 +165,8 @@ open class FoldingCell: UITableViewCell {
multiplier: constraint.multiplier, constant: constraint.constant)
newConstraints.append(newConstraint)
} else if let item: UIView = constraint.secondItem as? UIView , item == containerView {
let newConstraint = NSLayoutConstraint(item: constraint.firstItem, attribute: constraint.firstAttribute,
} else if let firstItem = constraint.firstItem as? UIView, let secondItem: UIView = constraint.secondItem as? UIView , secondItem == containerView {
let newConstraint = NSLayoutConstraint(item: firstItem, attribute: constraint.firstAttribute,
relatedBy: constraint.relation, toItem: animationView, attribute: constraint.secondAttribute,
multiplier: constraint.multiplier, constant: constraint.constant)
@@ -275,7 +275,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) -> Void)? = nil) {
open func unfold(_ value: Bool, animated: Bool = true, completion: (() -> Void)? = nil) {
if animated {
value ? openAnimation(completion) : closeAnimation(completion)
} else {
@@ -292,7 +292,7 @@ open class FoldingCell: UITableViewCell {
- parameter completion: A block object to be executed when the animation sequence ends.
*/
@available(iOS, deprecated, message: "Use unfold(_:animated:completion) method instead.")
open func selectedAnimation(_ isSelected: Bool, animated: Bool, completion: ((Void) -> Void)?) {
open func selectedAnimation(_ isSelected: Bool, animated: Bool, completion: (() -> Void)?) {
unfold(isSelected, animated: animated, completion: completion)
}
@@ -320,7 +320,7 @@ open class FoldingCell: UITableViewCell {
return durations
}
func openAnimation(_ completion: ((Void) -> Void)?) {
func openAnimation(_ completion: (() -> Void)?) {
isUnfolded = true
removeImageItemsFromAnimationView()
addImageItemsToAnimationView()
@@ -371,7 +371,7 @@ open class FoldingCell: UITableViewCell {
}
}
func closeAnimation(_ completion: ((Void) -> Void)?) {
func closeAnimation(_ completion: (() -> Void)?) {
isUnfolded = false
removeImageItemsFromAnimationView()
addImageItemsToAnimationView()
+21 -13
View File
@@ -1,8 +1,9 @@
[![header](https://raw.githubusercontent.com/Ramotion/folding-cell/master/header.png)](https://business.ramotion.com?utm_source=gthb&utm_medium=special&utm_campaign=foolding-cell-logo)
![header](./header.png)
![Animation](./Screenshots/folding-cell.gif)
# FoldingCell
[![CocoaPods](https://img.shields.io/cocoapods/p/FoldingCell.svg)](https://cocoapods.org/pods/FoldingCell)
[![CocoaPods](https://img.shields.io/cocoapods/v/FoldingCell.svg)](http://cocoapods.org/pods/FoldingCell)
[![CocoaPods](https://img.shields.io/cocoapods/metrics/doc-percent/FoldingCell.svg)](https://cdn.rawgit.com/Ramotion/folding-cell/master/docs/index.html)
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Ramotion/folding-cell)
[![Twitter](https://img.shields.io/badge/Twitter-@Ramotion-blue.svg?style=flat)](http://twitter.com/Ramotion)
[![Travis](https://img.shields.io/travis/Ramotion/folding-cell.svg)](https://travis-ci.org/Ramotion/folding-cell)
@@ -12,19 +13,17 @@
## 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?**
We specialize in the designing and coding of custom UI for Mobile Apps and Websites.<br>
<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>
**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.
[![Animation](https://raw.githubusercontent.com/Ramotion/folding-cell/master/Screenshots/folding-cell.gif)](https://dribbble.com/shots/2121350-Delivery-Card)
<a href="https://ramotion.com/?utm_source=gthb&utm_medium=special&utm_campaign=folding-cell-contact-us/#Get_in_Touch">
<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).
## 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+
@@ -151,8 +150,7 @@ fileprivate struct C {
}
```
#### if don't use storyboard and xib files
## if don't use storyboard and xib files
Create foregroundView and containerView from code (steps 2 - 3) look example:
[Folding-cell-programmatically](https://github.com/ober01/Folding-cell-programmatically)
@@ -162,8 +160,18 @@ Create foregroundView and containerView from code (steps 2 - 3) look example:
Folding cell is released under the MIT license.
See [LICENSE](./LICENSE) for details.
<br>
## Follow Us
# 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.
[![Twitter URL](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=https://github.com/ramotion/foolding-cell)
<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://ramotion.com/?utm_source=gthb&utm_medium=special&utm_campaign=folding-cell-contact-us/#Get_in_Touch">
<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>[![Twitter URL](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=https://github.com/ramotion/folding-cell)
[![Twitter Follow](https://img.shields.io/twitter/follow/ramotion.svg?style=social)](https://twitter.com/ramotion)