ramotion / folding-cell Goto Github PK
View Code? Open in Web Editor NEW:octocat: ๐ FoldingCell is an expanding content cell with animation made by @Ramotion
Home Page: https://www.ramotion.com/folding-cell/
License: MIT License
:octocat: ๐ FoldingCell is an expanding content cell with animation made by @Ramotion
Home Page: https://www.ramotion.com/folding-cell/
License: MIT License
n/a
Hey,
is it normal that when i launch my tableview with folding-cell it's takin' 3 seconds maybe 4 for launch? :/
Sad :(
Thanks
I have a foreground view with height of 100 and container view with height 200 ,I have all the needed constrains but i have this strange error.
everything is working fine but this warning is not ok
2016-09-04 20:43:03.447 TMDB[28304:3323822] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(
"<NSLayoutConstraint:0x7fca0bd54cc0 V:[UIView:0x7fca0bd50f70(200)]>",
"<NSLayoutConstraint:0x7fca0bd564a0 V:[UIView:0x7fca0bd50f70(84)]>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x7fca0bd54cc0 V:[UIView:0x7fca0bd50f70(200)]>
When I open or close the cell, I noticed that the unfolding animation is slightly to the left of where it should be. Is there a way to fix this?
I loved the second animation in the GIF, but don't see any code on implementing it. Has anyone figured out how to implement it? and is there a reason you guys didn't post the code - any issues with the animation itself?
Thanks for everything
I love the work you guys are sharing with us!
How would we go about customising the height of each of the folds of the cell animation @Pakhaliuk ? I know I can change the height of each of the views within the 'open' cell but then the animation still loads them at the pre-defined (and seemingly same height for every subview).
Can we edit the animation and if so, how?
Thanks very much for being awesome and sharing this!
Awesome work, I am using your code and it helpful for my requirement, but I have two issue like
Please guid me where is my mistake
Thanks :)
I have a slight issue with this framework, my "cards" are all with white background but when folding or unfolding the background of the other face of the card is a wired brown! How did this happen? I mean I didn't even specific any colour! Here are some screenshots to help clarify.
I also have a bit of a problem with some constrains, it gives me the "Unable to simultaneously satisfy constraints
" look, it also seems to happen in each "card":
2016-06-06 23:05:45.912 GL Dash[542:87484] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(
"<NSLayoutConstraint:0x127678ec0 V:[UIView:0x1276654c0(350)]>",
"<NSLayoutConstraint:0x1276beef0 V:[UIView:0x1276654c0(132)]>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x127678ec0 V:[UIView:0x1276654c0(350)]>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2016-06-06 23:05:45.914 GL Dash[542:87484] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(
"<NSLayoutConstraint:0x1276beef0 V:[UIView:0x1276654c0(132)]>",
"<NSLayoutConstraint:0x1276c2010 V:[UIView:0x1276654c0(75)]>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x1276beef0 V:[UIView:0x1276654c0(132)]>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
Tiago
I have a task list app that I want to implement folding cells into, but I want to make sure that cell folding behavior will still be as expected after deleting and reordering cells in the table view.
This is an awesome pod.
I am so sure, developers working with react native will love it.
example way to have a bridge for react native: https://facebook.github.io/react-native/docs/native-modules-ios.html#content
kRowsCount is never defined in my TableViewController class, should I assume it is just an arbitrary integer?
How do I get the folding animation to happen on multiple views. Right now I have 3 views in the container, and I set the class of the last 2 to Rotated View, and added tags 1 and 2. Then I set the constraints. The animation is only folding once though when it should be folding 3 times. What am I missing?
Can you make it compatible with Carthage?
Thx
I have a tableview made of folding cells.
Each cell has a label which shows a row of the indexPath.row of the tableview.
Clicking on the cell the cell "opens" showing the same label of the closed cell and other information related to the same indexPath.row.
While I scroll the tableview everything is perfect.
On the contrary while the cell is opening the labels show the wrong text (they show the text of other rows not the previous or the following, the index is related to a text that is further up or down).
Of course the cell is completely open everything is fine also while I scroll the tableview.
Any idea how to solve this?
Thanks
I'm not a great fan of storyboards or nibs.
Your solution is awesome, but would be good to have more flexibilities in use.
Hi, this looks really cool!
But I am having trouble to implement this to my app with no storyboard?
Could you please provide me with sample project where is no storyboard?
Huge thanks!
When copying FoldingCell from your example projects - everything is fine, but when I'm creating TableView Prototype cells from scratch, adding constraints, it is falling here: https://github.com/Ramotion/folding-cell/blob/master/FoldingCell/FoldingCell/FoldingCell/FoldingCell.swift#L64, as no constraints are found for self.contentView
My app has content that changes within the cells quite frequently. If a change happens while the cell is expanded, then the cell is closed, during the animations the content changes back to the old values. Is there a way to refresh what is shown during the animations?
Thanks for the great work BTW!
I created everything with the storyboard, justing setting the cell to FoldingCell, where do I add this method?
`override func animationDuration(itemIndex:NSInteger, type:AnimationType)-> NSTimeInterval {
// durations count equal it itemCount
let durations = [0.33, 0.26, 0.26] // timing animation for each view
return durations[itemIndex]
}`
Hello,
Thanks for this great work, is there a way to programmatically close all folding cell opened ?
Regards
Dear Ramotion and folding-cell lovers
I am trying to create a basic table in my app that uses folding cell. In order to do this I have one question: What line or function actually creates the cell? For example, in the default Master-Detail application, it is the insertNewObject function. The reason I would like to know this is because I want to make it so when the user hits a button, a new cell is created. Thanks.
I'm having issues with connecting this lib (and others) to Xamarin. Perhaps you can lend some expertise:
Hey,
i keep getting this message when running my app. kCloseCellHeight and kOpenCellHeight are greater than the storyboard constraint. Any ideas what could be wrong?
Thanks a lot
This seems really nice but for someone new to swift the documents are really hard to follow.
Hi,
Thanks for providing the animated cell, i changed some pf the properties in storyboard it lead me to [UIView transform3d]: unrecognized selector sent to instance
crash.
How can i do stepwise in unfolding stage similar to folding process
I am getting the above mentioned error, seems like a method, configureDefaultState(), within FoldingCell.swift, is checking for "ForegroundViewTop" and "ContainerViewTop".
Maybe clearer documentation on how to add those 2 in the storyboard.
No Objective-c version?
Hey there! Love the work! Noticed some unusual memory behavior.
The memory usage increases by a lot every time I tap to open a cell (which will then load images with SDWebImage, as well as other data from the server), but it never comes down. Now, I understand dealing with images is expensive, but is there a way to work around this issue? Please let me know what you think.
I followed the instructions and I achieved the effect I wanted, but I still get this warning that I don't understand how to remove.
<Error>: CGContextTranslateCTM: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Could you please help?
Dear Ramotion
I was just wondering how to control UI (for example a textfield that is in the cell) from the DemoCell class. It appears that the FoldingCell (what DemoCell inherits from) does not allow this. Please help. Thanks.
Hello!
I recently got this library up and running in my project, and I just want to start by thanking @Ramotion for creating this library. It's amazing!
This is a mockup I've drawn in sketch delineating what I'd like to accomplish:
The issue I have at hand is that the default library appears to be defining an anchorPoint (shown below) that puts my content in the wrong position.
foregroundView.layer.anchorPoint = CGPoint.init(x: 0.5, y: 1)
Here's a visual showing the green UIView covered by the NavigationBar:
If I remove the line of code shown above, I get it to work (partially).
The other problem is that the foregroundView exceeds my defined height.
To give some more context, I've set the cell heights programmatically in my primary TableViewController as 120 pixels:
var itemHeight = [CGFloat](count: 1, repeatedValue: 120.0)
I define the layout constraints of my foreground/container views in TestCell.swift which inherits from FoldingCell.swift, the code below is supposed to set the foregroundView height at 110 pixels.
How might I be able to resolve this issue?
Any help is appreciated!
Project should have a description, such as
TableViewCell replacement with parallax detail view for Swift
Make containerView
and foregroundView
public because now they are internal so we can't use them in subclass as you used them in demo project to change maskToBounds
and cornerRadius
(you could because you have everything in the same module in demo project)
Hi man!
Can you estimate port this control for android? and send estimation to [email protected] . thank so much
Hi,
I am getting the following run time error while trying to run the app.
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Must translate autoresizing mask into constraints to have _setHostsLayoutEngine:YES.'
Please help me
Figured it somehow. I am getting this error now
I need to make the foregroundView larger to fit an image. I want them all to be the same height. I have been trying to figure this out for days now, and can't seem to get it right. Does anyone have sample code?
Is it possible to implement this in a collection view?
Dear Ramotion and folding-cell lovers
I am trying to create a basic table in my app that uses folding cell. In order to do this I have one question: What line or function actually creates the cell? For example, in the default Master-Detail application, it is the insertNewObject function. The reason I would like to know this is because I want to make it so when the user hits a button, a new cell is created. Thanks.
Hello First of all i want to thank you on this amazing project.
and second of all i want to ask about an issue that i encounter which is I keep having an error about the range on this code:
override func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat {
return cellHeights[indexPath.row]
}
I want to know exactly where is the problem and i have another questions if it possible when i downloaded the project to my desktop and examine the design i notice that showing the design as in the image which showing the map is not really in the demo so if how i can apply it on the demo, that is it and thank you again
Hi Ramotion-Team,
you've written in the docs, right below the Installation[1] headline: Just add the FoldingCell.swift file to your project.
In other words, i can clone the project and drag and drop the FoldingCell.swift
file manually, and do not have to use CocoaPods or Carthage?!
My foreground view height is 170, container count = 2, so i made my container height = 340 but it is still crashing. I tried different heights between 300 to 400. I followed as per the formula
When itemCount equal 2 your containerView.heigh must equal 2 * foregroundView.height
When itemCount greater 2 your contanerView.height must bigger when 2 * foregroundView.height
Solution plz?
Is there a way to make the height of ContainerView vary based on its content, like a long string?
Hello! Any ideas to use multi-threading or etc to faster the set-up/init time? The set-up time grows from 6s(iphone 6s) to 30/40s (iphone 5c/4s)!
What can be a problem? How to solve the time spreading?
Anyway tnx for response!
I'm a novice programmer, but I'm pretty sure I'm doing all the steps right... keeps crashing when selecting the rotated view: "fatal error: Array index out of range"
All the breakpoints seem to be happening on animation lines:
2 0x00000001002eb878 in FoldingCell.openAnimation(completion : () -> ()?) -> () at /Users/Brabble/Documents/Squad/Pods/FoldingCell/FoldingCell/FoldingCell/FoldingCell/FoldingCell.swift:318
3 0x00000001002ea948 in FoldingCell.selectedAnimation(Bool, animated : Bool, completion : () -> ()?) -> () at /Users/Brabble/Documents/Squad/Pods/FoldingCell/FoldingCell/FoldingCell/FoldingCell/FoldingCell.swift:237
4 0x00000001000d2930 in DemoTableViewController.tableView(UITableView, didSelectRowAtIndexPath : NSIndexPath) -> () at /Users/Brabble/Documents/Squad/Squad/DemoTableViewController.swift:67
Am I missing something?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.