1

I've created something similar to the picture I've added. I've connected using Ctrl+Drag the UIButton to the Child View 2 ViewController and selected push segue.(the picture shows custom segue, ignore it please)

My problem is that when I tap the button the new ViewController is in full size (covering that all screen)

How can I force it to stay in the same size of the original Container?

Edit:

From the answers i've found that Embedding VC B in a new navigation controller does force VC C to be pushed in smaller size, I would like to understand why I can't use the original Navigation Controller. to do the same thing

Segev
  • 19,035
  • 12
  • 80
  • 152

1 Answers1

5

What you say you're doing isn't possible. You can't do a push if your controller isn't embedded in a navigation controller. If you embed Child View 1 in a navigation controller, what you're trying to do should work.

rdelmar
  • 103,982
  • 12
  • 207
  • 218
  • I knew I shouldn't be linking to some pic I found on the web. I've uploaded a new picture to my question. Can you please explain to me why push from VC B to VC C is working but at default size? Embedding VC B in a new navigation controller does force VC C to be pushed in smaller size, I just don't understand why I can't use the original Navigation Controller. – Segev Jun 14 '13 at 15:09
  • @Sha , you can't do that because VC B isn't embedded in a navigation controller. The fact that VC A is embedded doesn't make B be embedded, since it's really a subview of A rather then a subview of the navigation controller's view. – rdelmar Jun 14 '13 at 21:25