1

users,

i have a problem i cant get my head around, i hope you could help me out;

I'm building a small iphone app that will basically have a topbar(image), groundbar (image) and in the middle a middlebar (scrollview) which is used for PageControll.

All is fine until i tell IB that my rootViewController is a navcontroller. The pagecontrol isnt interactive anymore and it seems like its just displaying the view. The purpose of the navcontroller will be to push a new view when someone double taps on the scrollview area.

Do i have to define the PageController to be a childcontroller of the rootController NavController? Or isnt the PageController a controller at all and do i have to seperate the scrollview from the main delegate?

I hope someone can shed some light on my problem; thanks in advance!

Best regards, btz

BTZ
  • 23
  • 6

1 Answers1

1

UINavigationController objects hold other ViewController objects. You do not manipulate any views from the navigationController, instead, you push the viewController whose views you want to display on the navigationController's stack.

I can't be more specific than that until you get more specific, for instance by posting some code.

fzwo
  • 9,842
  • 3
  • 37
  • 57
  • You are completely right! I was looking into more info about controllers to really get the hang of it. Now that part of the code is complete. Now i have a different problem: I have a scrollviewcontroller's view that is loaded from my mainview. I use the touchesbegan method to detect double tap and i want the scrollviewcontroller to push a new controller onto the stack. It seems like it isnt possible to push a view from within a different viewcontroller class. Or is it? – BTZ Jul 13 '11 at 16:46
  • Glad I could help. Please open a new question for the second problem, and, if possible, post some code. If you post a link there as a comment here, I'll have a look at it when I can. – fzwo Jul 13 '11 at 22:06
  • http://stackoverflow.com/questions/6700800/push-viewcontroller-from-within-other-viewcontrollers-that-are-not-on-top-of-navs – BTZ Jul 19 '11 at 15:52