Coder Social home page Coder Social logo

Comments (1)

DenTelezhkin avatar DenTelezhkin commented on June 30, 2024

First of all, i would recommend trying to put all your data inside single UICollectionView - you can try putting each deck in it's dedicated section. If this is possible in your setup, than it will greatly simplify all efforts.

Second, if that is not possible or easy to do in your case, you can definitely put a UICollectionView inside of UITableViewCell managed by DTTableViewManager - this was actually the reason why DTTableViewManageable protocol never implies that it is a view controller. However, in this case there are several things you need to worry about:

  • Creating UICollectionView - this needs to be done on freshly created cell, UICollectionView needs to be added as a subview, and have appropriate autolayout constraints.
  • Starting managing items - those need to be transferred from your DTTableViewManageable instance, possibly inside configureCell closure.
  • Cell reuse - on cell reuse all resources need to be cleaned up. It's possible that it may be sufficient just removing all items from DTCollectionViewManager storage to avoid cases where UICollectionView goes offscreen and still has items inside.
  • Perfomance - displaying several UICollectionViews inside a single UITableView has been a bottleneck for me in the past - you will need to make sure that cells are super fast, otherwise on slow devices you will see slowdowns and lags. You will probably need to use Instruments and Time Profiler to make sure that everything is fast enough.

Hope this helps you solving your task. I will close this issue as it's more a question than an issue, but you can ask more questions here if you have problems implementing this stuff.

from dttableviewmanager.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.