paginationuiviewcontrolleruiscrollview

UIScrollView with Paging and new View Controllers


I currently have an app that has a UIScrollView with paging as the primary ViewController. However, currently, I am trying to animate to a new ViewController, but whenever I use presentModalViewController or an animation using UIView, I am still able to scroll, left and right on the original view.

I was successfully able to keep it from scrolling by adding it to the window:

UIWindow *window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    [window addSubview:NEWVIEW.view];
    [window makeKeyAndVisible];

However, after using this code, I was uncertain of how to return to the original scrollView.


Solution

  • Solution: I fixed this problem by putting all of my viewcontrollers into one xib file. I set then all up as IBOutlets and then modalViewController worked just fine.