-1

I am working on iOS 7+ for the iPhone.

In a typical iOS app with a Table View Controller, you have the master / detail user experience where one taps on a master-item in the list and you transition to a details-screen of the selected master-item aka item. That's what we're doing in Portrait mode. However...

My requirement that I am working on now is for when we go to Landscape mode and is as follows:

  • Presume the user starts with the iPhone in Portrait mode, there is a list of items shown in a table view controller.
  • When the user rotates from Portrait mode to Landscape, (launch a new view controller and) show in columns the details of all the items and have the phone be scrollable horizontally and vertically. One column of details per item.
  • Alternate the background color of every detail-type so that one can visually compare a detail-type between items. For example Safety Features is a detail type.

How would you implement such? Goal:We want the user to be able to compare the details between items.

Ideas I had were as follows:

  • UICollectionView with a layout such that all the column-cells line up in one long row. Synchronize all the vertical scrolls between each cell (hard?).
  • PageViewController with ..TransitionStyleScroll - Is that possible? Can I show two columns at a time in a Page View Controller with a ..TransitionStyleScroll and not center on a single page?
  • Find existing control on cocoacontrols.com - no luck
  • Create one view per item-detail-column and stick views side-by-side inside of one large view controller. This would take care of the scroll-synch issue mentioned above. Problem: These are non-trivial item-detail screens so it would take awhile to do.

I looked at

I do not see a straight forward approach that would leap out at me. So, before I dive deep into one path, I am hoping for some guidance on this. Thanks in advance for any insight.

finneycanhelp
  • 8,436
  • 12
  • 46
  • 70
  • http://stackoverflow.com/questions/13179703/uicollectionview-scrolling-in-both-directions may be the answer. "UICollectionView embedded in a UIScrollView." Off and on, it took days to find something that sounded try-worthy. Now that I have something to try, should I delete this Master/Detail landscape design question? – finneycanhelp Aug 27 '14 at 03:06

1 Answers1

0

Having a "UICollectionView embedded in a UIScrollView." is the best answer. To force the UICollectionView to have one long row, one adjusts the height of the collection view so that it matches the height of the cell.

What also helped was this tutorial: http://www.appcoda.com/ios-programming-uicollectionview-tutorial/

Based on that tutorial, I created example code.

Community
  • 1
  • 1
finneycanhelp
  • 8,436
  • 12
  • 46
  • 70