ElegantPages icon indicating copy to clipboard operation
ElegantPages copied to clipboard

Setting Custom height for ElegantHList based on content

Open sai-kante opened this issue 3 years ago • 0 comments

Hello Kevin,

This is more of a question rather than a issue.

I am trying to use ElegantHList and set the height of the view to height of the cell. I have this as ViewForPage

Text("sample text")
            .background(Color.yellow)
            .erased

When I use that in ElegantHList, it takes full screen height rather than height of the text. Screen Shot 2021-01-10 at 10 13 21 PM

I know I can specify .frame(height: 50) etc., But, I would like this to be dynamic based on height of my view. Can you please tell me if there is a better way ?

P.S: this is my first iphone app.

Thank You, Sai

sai-kante avatar Jan 11 '21 06:01 sai-kante