How to use different UI elements for iPhone and iPad using size class

88 views Asked by At

I want to use 2 different design for iPhone and iPad.eg,Burger menu in iphone should not be present in iPad,Header tabs in iphone should be replaced with tableview in ipad.Is this usecase comes under size class ?

1

There are 1 answers

0
7vikram7 On

Size classes are fine when for minor UI tweaks across varying screen sizes.

Like if you need the header to be a bit larger on one resolution than the other, place views horizontally adjacent instead of vertically adjacent on larger screen etc.

But looking at your requirement (replacing headers with UITableView). It would be better if you create 2 separate views for iPad and iPhone. This will keep the code easy to read as well as maintain in the long run.