I want to make a table cell with a snapshot and wrap the text with an automatic layout. I managed a lot with the auto layout, but I donβt understand how to do it.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β ββββββββββββ ββββββββββββββββββββββββββββββββββββββ β β β β β Title (might wrap) β β β β β ββββββββββββββββββββββββββββββββββββββ β β β Photo β ββββββββββββββββββββββββββββββββββββββ β β β β β Body text. May wrap, may contain β β β β β β multiple lines. β β β β β ββββββββββββββββββββββββββββββββββββββ β β ββββββββββββ β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
As the text expands, I want to save the photo in the upper left corner and expand the cell. However, the cell should not decrease below the minimum size required to display the photo (with margins).
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β ββββββββββββ ββββββββββββββββββββββββββββββββββββββ β β β β β Title (might wrap) β β β β β β Maybe even to two lines. β β β β Photo β ββββββββββββββββββββββββββββββββββββββ β β β β ββββββββββββββββββββββββββββββββββββββ β β β β β Body text. May wrap, may contain β β β β β β multiple lines. β β β ββββββββββββ β β β β β Text could require more vertical β β β β space than the photo. β β β ββββββββββββββββββββββββββββββββββββββ β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
I need iOS 8 or later.
I tried to do this with only three views viewed, and also placing the left element and the right elements in two views. I try to ignore the minimum photo size for each combination.
(Btw, for anyone curious: Graphics via Monodraw.)
source share