Let me explain the idea. Let's say the text and title comes from the Internet. The text takes up more space than one page shown in the gif. How to make automatic generation of cards to fully fit the text, also taking into account the size of the device (that is, smaller phones will have more cards, because there will be fewer cards). Also, the title must appear once on the first card. The last card may be half empty, if that happens. How can such an algorithm be implemented? Please, help me.
SwiftUI or UIKit is welcome.
SwiftUI or UIKit is welcome.