SwiftUI Table on iPhone Duo

I am using the Table view in my app. On iPhone it only shows the first column, on iPad and Mac it shows all the columns. Since the Table view does not have an API to determine if the columns are shown, I am using self.horizontalSizeClass == .compact to find out if I need to show all content in the one column.

Since the iPhone Duo is still an iPhone, even if it's unfolded, it only shows the one column, but the horizontalSizeClass is not compact. If we ignore that this all doesn't make any sense (why doesn't the Table just show the columns?!) my question is: how can I handle this case? Currently it just shows the first columns content.

When I hack around and show the same content in the first column as on a "normal" iPhone, it's not helpful:

Thanks for the question, what are you trying to accomplish? Are you using size classes like you're trying to go from one screen to opening the phone?

Can you describe your goal? Does not look like you are using ArrangementView, you are using a Split View in the screenshot.

Your horizontalSizeClass == .compact check is on this device but SwiftUI’s Table behavior is actually tied to a combination of both the User Interface Idiom and the Size Class, not just the size class alone. Take a look at https://developer.apple.com/videos/play/tech-talks/111463/

Do you check if the size class is compact?

Albert  WWDR

SwiftUI Table on iPhone Duo
 
 
Q