Giter Site home page Giter Site logo

Comments (3)

philipplotnikov avatar philipplotnikov commented on June 12, 2024

In addition to the issue (and example) described above.

Resizing of the DTAttributedTextContentView should be done in layoutSubviews of the cell itself. Because DTAttributedTextContentView has autosizing options set it should accept the orientation changes. This works by simply setting the new bounds on DT view. However, another issue occurs when you start scrolling. After initial table load, scroll down to the last cell, than rotate the iPhone to landscape and scroll back to top. Some of the cells will overlap the content set by DT.

Reproduce:

  • Enable shouldAutorotateToInterfaceOrientation on DemoSnippetsViewController
  • Subclass UITableViewCell and set [self contentView] bound to [self bounds] to reflect the orientation changes.
  • scroll up -> rotate -> scroll down -> rotate etc etc.

from dtcoretext.

odrobnik avatar odrobnik commented on June 12, 2024

Please have a look at https://github.com/Cocoanetics/NSAttributedString-Additions-for-HTML/commit/bee689c5e37086bef14d61710a1bd2a3882eddea

This should fix your problem by implementing DTAttributedTextCell for use in auto rotating table views.

from dtcoretext.

jfmorin avatar jfmorin commented on June 12, 2024

Thanks for the update!

JF

from dtcoretext.

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.