changed viewWillAppear to setSelectedPageIndex with anited marked to YES. It was causing some issues if navigation controller. PageViewController is now public