views:

48

answers:

1

I have an iPhone app in development that requires three slides (views). The problem is, since I'm kinda new to this, I'm not sure what's the most logical way to approach this situation.

I was going to use a UINavigationController, but then I noticed that the UINavigationController is meant for hierarchical content, which means that it starts with a root controller which has the lowest level, and then views go child to child. But in my scenario, I have the main/root controller/view in the middle; and you can go to the left or right one, which would represent the middle one's children.

I could set the left view to be the root one, and quickly jump to the second/middle one; but this would be sort of a "hack" since I'm lying myself. Should I do that, or use a UITabBarController (haven't read too much about it), or something else?

Note that none of them will have their nav bar displayed since I want the navigation to be made through swipes.

Thanks!

+1  A: 

You might want to try using the UIScroll in a paged mode and laying your views out on that (similar to how Photos works on the phone).

Greg Martin
Hmm, I just looked at the Photos app (yeah, this might seem funny) and it seems pretty much like what I want (except the content), even swipe-able. I guess there should be a "step" setting of some kind to be set for the size of a full window, right?
treznik
Yes, I would check out the PageControl sample on the Apple Developer site. You can define the content size, layout your views, and define paging behavior to create that effect. The Safari app (or TweetDeck) on the phone do this as well, a little differently as they do a transform to zoom out before allowing paging.
Greg Martin