views:

42

answers:

1

Hello all,

I am trying to develop a program wherein which the first screen contains a button and after the click of the button, it should take me to a scroll view and a page control. I have successfully developed these two modules separately. But I am facing problems in integrating them. The first module lets me click and takes me to my next screen and the other module starts up with a scroll view and a page control as in the PageControl sample given by Apple. Please help. Thanks for your time. Really appreciate it.

A: 

I don't think having the first view controller be a delegate for a different view controller's view objects would be a nice design. Instead, let the first VC send a message to the second VC, telling it what it wants to be displayed. The second VC can then use -setContentOffset:animated: to push the scroll view to the correct place.

Graham Lee
Thank you Graham Lee for your response. But I guess my question was constructed in a bad manner. What I require is a first view with a button or some sort of control. This button after clicked should lead to a scroll view. So basically my second view is a scroll view with certain pages to be scrolled and the first view is simple view with a button which will display the scroll pages. The first view is not part of the scroll.
Viraj