2

iOS 7's notification seems nice. I know it is using Segmented Control, but how exactly it is be done?

I'm using storyboard, mainly contain of three segment (does this means I need three different UIViewController?)

I have a collection view on first segment (supporting ios 5+ above, but this hasn't comes to my concern yet), table view on second segment and a normal view with Labels and TextBox on third segment.

My idea is doing things like the iOS7 notification center, "Today, All, Missed", able to swipe left and right, and the UI transition is sliding. Please help as I'm still quite fresh to iOS development.

Robin1990
  • 1,717
  • 2
  • 11
  • 13

1 Answers1

3

Try using a UIScrollView as your outer view here, with paging enabled. As the user goes from page to page, update the Segmented Control.

Joel Fischer
  • 6,521
  • 5
  • 35
  • 46
  • hmm currently i have a uiscrollview and three view in it, run and build successfully but the view wont scroll. do i need to add gesture recogniser? – Robin1990 Oct 16 '13 at 16:01
  • Did you enable paging on the UIScrollView? Look to this answer: http://stackoverflow.com/questions/1220354/uiscrollview-horizontal-paging-like-mobile-safari-tabs/1220605#1220605 for some more information on getting paging to work with a ScrollView. – Joel Fischer Oct 16 '13 at 18:07
  • Yes I enabled paging, after toubleshooting, it turns out I didn't delegate the uiscrollview to self. now the problem goes to unable to change page due to contentOffset.x always =0. but anyway, the problem considered solve, as you have provided answers for my question. Thanks – Robin1990 Oct 16 '13 at 18:36