1

I have only one view controller with collection view in page view controller and having search button on the navigation bar when i click on search bar and did search then the result is shown properly means child view controller is updating but when i slide it on left it also showing me the original content of collection view also. how can i remove that previous view controller and show only result child view controller.

Akshay0309
  • 41
  • 7
  • if u want to disable the previous view controller, this may help u http://stackoverflow.com/questions/15829197/disable-enable-scrolling-in-uipageviewcontroller – Shebin Koshy Aug 31 '15 at 05:01
  • actually i want to update content view controller which has collection view but in background it showing previous content also and in front the search result. – Akshay0309 Aug 31 '15 at 07:07
  • set the frame of search result view as device screen frame = UIScreen.mainScreen().bounds (swift) [[UIScreen mainScreen] bounds] (objective c) – Shebin Koshy Aug 31 '15 at 07:15

2 Answers2

0

Then you dont want a page view controller, A pageview controller will reuse the single child view controller each time the swipe is detected. In your page view controller delegate methods properly check the values from which it is being loaded is the array being reduced permanently or are u using a mutable copy of the array each time you reload the page view controller contents.

Saheb Roy
  • 5,899
  • 3
  • 23
  • 35
0

I answered a possible solution to a similar question. Maybe it will help you.

UIPageViewController keeping previous ViewController on the Background of the view

Community
  • 1
  • 1
rharvey
  • 1,987
  • 1
  • 28
  • 23