Note that there are some explanatory texts on larger screens.

plurals
  1. POChanging viewcontrollers with smooth push transition and without navigationcontroller
    primarykey
    data
    text
    <p>I'm trying to change from <code>viewcontroller</code> view1 to <code>viewcontroller</code> view2 with a smooth and nice transition, where view1 gets pushed to the left by view2 within a second. I have made a simple illustration of what I want in my iPhone app.</p> <p><img src="https://i.stack.imgur.com/uHOsC.png" alt="enter image description here"> --> <img src="https://i.stack.imgur.com/NE4v6.png" alt="enter image description here"> --> <img src="https://i.stack.imgur.com/BSeS4.png" alt="enter image description here"> --> <img src="https://i.stack.imgur.com/NF18Y.png" alt="enter image description here"></p> <p>I am using storyboard and developing for iOS 6 and higher. I'm not using segues. Currently I'm using this code to change from view1 to view2 without any animations in Xcode:</p> <pre><code>SecondViewController *viewTwo = [self.storyboard instantiateViewControllerWithIdentifier:@"View2"]; [self presentViewController:viewTwo animated:NO completion:nil]; </code></pre> <p>I am looking for code that can replace my existing code with. Code that changes from view1 to view2 with the push transition</p> <p><strong>NOTE</strong>: I am not using <code>NavigationControllers</code>! Just normal <code>ViewControllers</code>. I would prefer to do this with codes.</p> <p><strong>EDIT</strong>: I understand that this would be very easy to do if I used a navigation controller, but the problem is that I'm done building the storyboard and I have already buildt everything using normal view controller. And that creates my second question:</p> <p>Are there any way I can simply convert my <code>UIViewControllers</code> to work as <code>UINavigationControllers</code>. Without having to delete my <code>UIViewController</code> and build it again only using <code>UINavController</code>?</p> <p><strong>ANSWER</strong>: I solved my problem by implementing a navigation controller to my project. I have totally misunderstood the whole concept of navigations controllers earlier, but I have now figured it out. So my problem is solved!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload