Comments (2)
Hi @richardtop - thanks for the question!
If you are asking if the cards are able to be a dynamic height and have an infinite amount of cells in it, then yes, it certainly can!
Let's take the Snapchat example:
For simplicity, we will just take about the best friends card and the recent card.
You can achieve that by having 2 CardPartTableViews with custom CardPartTableViewCardPartsCells. In your viewModel you could store the logic to filter/sort whom is a best friend and whom is a recent contact. Then you would bind that array of data to each of the tableView's. If for instance, you had 100 recent contacts, your table view would have 100 cells and the card would dynamically grow to be large enough to fit all cells.
Feel free to let us know if you have any other questions!
from cardparts.
Hi @croossin, thank you for your prompt response.
I guess, I was misunderstood - my question was about supporting cell reuse in the UITableView in the aforementioned configuration.
I give CardPartTableView a try and increased the number of rows in the example project, so that my ViewModel now looked like this:
class CardPartTableViewModel {
let listData: Variable<[String]> = Variable([])
init() {
var tempData: [String] = []
for i in 0...100 { // Increased the number of cells to 100
tempData.append("This is cell #\(i)")
}
listData.value = tempData
}
}
However, it seems that the UITableView is displayed fully, without the cell reuse. Is there any way to configure the CardPartTableView supporting the built-in cell reuse behavior?
The example of a result I'm trying to achieve:
from cardparts.
Related Issues (20)
- Custom margins per CardController HOT 9
- Theme properties are not overridable for an individual CardsViewController
- CardPartPagedView doesn't scroll content when currentPage is set.
- Add a component based on UITextView HOT 2
- CardParts Cannot be shared across states
- Auto Resizing Issue on Modal Views Presented in formSheet Style HOT 4
- Load a custom collectionViewCell into cardsPartViewController HOT 1
- Animation for CardPartSliderView
- RxSwift needs updated HOT 2
- view is left aligned until start scroll - iPad only HOT 1
- Allow override of scrollViewDidScroll in CardsViewController HOT 3
- Card width and height HOT 2
- Can i setup CardController with other custom view such dropdown view as a part in setupCartParts
- Custom UIView Part overlap each other part
- [help wanted]pod install doesn't include the development Pods HOT 2
- Support 2 column view for iPad HOT 2
- Cannot find type 'CardsViewController' in scope HOT 2
- Different themes for different CardViewControllers? HOT 1
- Fix Array `safeValue(at:)`
- reload specific card inside CardPartsViewController by calling loadSpecificCards
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cardparts.