简体   繁体   中英

Page View Controller showing previous view controller after adding subviews

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.

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.

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

UIPageViewController keeping previous ViewController on the Background of the view

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM