views:

181

answers:

2

Twitter for iPad introduced a new way of browsing content. Does anyone have a guess of how these sliding panels are managed? Is it one big UIScrollView with a bunch of UITableViews in it? Or a bunch of UIViewControllers sliding on top of each other? Or something else? What's your bet?

+2  A: 

I think the trick here isn't in the view types used, but rather in the positioning and animating of them. When various panels slide in and out, I think they're using something like some CAKeyframeAnimations that activate through an implementation of UIGestureRecognizer.

For vertical scrolling they're using UIScrollView, but for horizontal scrolling, the above is my bet.

Farid
All of the table views are scroll views, of course, so there's no magic needed to get the vertical scrolling. The animations are pretty simple (slide left, slide right); doubt you'd need keyframe animations. But the horizontal scrolling is actually pretty complex. It probably *could* be done with a gesture recognizer, but almost certainly not the stock ones.
Sixten Otto
A: 

Supposedly the developer flattened a navigation controller into slidable panels. Yet no other info is known to my knowledge.

Original tweet

It kind of makes sense, it's basically just a UINavigationController and the way you move up and down the stack changes. Instead of showing just 1 UIViewController at a time, now multiple can be shown. I can't really help with the exact implementation though.

Yannick Compernol
Worth noting: that tweet is just some random guy's conceptual commentary, not any kind of info from the developer.
Sixten Otto
Worth noting: it's not some random guy's commentary. Mike Rundle (flyosity) is a pretty well known and respected iOS developer. I'm sure he has had his reasons to tweet that.
Yannick Compernol
Wasn't impugning his talent. What I meant was, he's an outside observer talking about how the app seems to behave, not someone with any inside knowledge. And, again, he's talking about how the app works conceptually (yes, it's a nav controller laid out edge-to-edge), *not* how that's actually accomplished at a UIKit level (which is what this question is asking). I'd love to read Rundle's speculation on that!
Sixten Otto