Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7433329
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:39:08+00:00 2026-05-29T09:39:08+00:00

The issue is this. I have a PageViewController as my root view controller. Initialising

  • 0

The issue is this. I have a PageViewController as my root view controller. Initialising the first page using SetViewControllers in the ViewDidLoad block of the PageViewController class works, as does the flipping back and forth of pages using the page’s gesture recognizers. This root view controller is available application-wide via the AppDelegate.

I wanted to add the ability to return to the first page from anywhere in the book, so created a public method in my PageViewController class that simply called the SetViewControllers method. While this appears to work, I’ve noticed certain quirks. Music that is looping in the background (again, an AVAudio object declared in the AppDelegate) is restarted and the ViewDidLoad block doesn’t fire until the page is turned again using the gesture recognizers.

I tried the same thing using GetNextViewController but that simply throws a null reference exception for the PageViewController reference. I’m assuming there is some relationship between the controls I’m not grasping, perhaps something to do with the PageViewController’s DataSource. I have tried delegating this to a class that overrides the default methods, as well as using Mono’s this.pageViewController.GetNextViewController = delegate(method signature) syntax to no avail.

Does anyone have any insights as to what my problem here is?

Edit: Code for AppDelegate.cs can be viewed here: https://gist.github.com/1747537 and for PageViewController.cs here: https://gist.github.com/1747559.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T09:39:09+00:00Added an answer on May 29, 2026 at 9:39 am

    I can see several issues in your code:

    • your PageViewController is already the root controller in your app, there is no need to call AddSubview() anywhere.
    • You are inherinting from UIViewController and then encapsulate a UIPageViewController.You should either inherit from UIPageViewController or have no inheritance at all (if it is true as Dimitri says the UIPageViewController is not meant for subclassing).
    • The ReturnToFrontPage() could be a method of your AppDelegate instead of your subclassed UIPageViewController.
    • With your combination of inheritance and encapsulation you are building a hierachy of view controllers. This will make problems with events being triggered if not implemented properly.

    In short: don’t inherit anything in your case. Use a plain UIPageViewController and make the ReturnTpFrontPage() a method of your AppDelegate, then it should all be a walk in the park.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this strange issue with my web app. You see, I'm using jQuery
I have this exact issue ASP.net can’t update page from event handler and it's
I have this issue that appears only when using a webkit browser. Sometimes, when
I have this issue using assembly MIPS. From the keyboard I read an integer
I have this problem with a link in an HTML page where the first
I have this weird issue in Magento when someone places an order using PayPal
Been Facing this issue,I Have as my view <%= form_for(:pin, :url => {:action =>fees})
Im using Propel ORM in my development and I have this issue: $mo =
I am using SQL Server 2008 and I have this issue. I have a
I am new to Knockout Js..I have this issue on my page that when

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.