Card \ PresenterCard sample does not show card in ios 13.1
ruggierom opened this issue · 3 comments
ruggierom commented
I'm trying to get the Card Sample projects to work in iOS 13.1 + but the call to layout does not seem to render anything. It works fine on iOS 12. Is there a known workaround?
Thanks!
Michael
ruggierom commented
I'm not sure why but in iOS 13+ after calling .layout() the frame width and height of the card is 0. If I reset the frame W and H everything is fine. X and Y are fine.
ebenites commented
Hi Ruggierom, How do you fixed this issue? How do you reset the frame?
ruggierom commented
Hi ebenites,
I just made this change in the prepareCard function. I'm not really sure why it works : )
//capture card W and H before calling layout
let origW = card.frame.bounds.width
let origH = card.frame.bounds.height
view.layout(card).horizontally(left: 20, right: 20).center()
card.frame = CGRect(x: card.frame.bounds.maxX,
y: card.frame.bounds.maxY,
width: origW,
height: origH)