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 3336788
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T00:10:38+00:00 2026-05-18T00:10:38+00:00

I am putting an iPad application together that allows a user to work their

  • 0

I am putting an iPad application together that allows a user to work their way through a virtual tour. They are able to move forward through screens on which some will have buttons to other material such as a video or more info.

If Keynote supported Hyperlinks then it would be well suited but as it doesn’t I am trying to recreate the tour within Xcode.

I am a newbie but have spent time researching and have code to display the ‘slides’ and the capability to move forward and back through them. The slides are no more that an image view with a full screen graphic and buttons for the various options, some slides are simple and have nothing other than back and forward but others will have additional links

However doing it in this simplistic way means I am ending up with a huge number of view controllers and XIB files, currently at 75 which I know must be more than any app should have. However it does work although on occasions when running it on the device and not in the simulator it will bomb out.

My questions are is there a limit to the number of view controllers in one app and will having a large number cause the instability? I’m aware of other ways to handle the views such as having them in arrays and pushing them out a single view controller but this won’t give me the flexibility to tailor slides for different content.

I’d welcome any help or advice and I hope have gone about posting this question in the right way (its my first)

Many Thanks
Kieron

The code I am using to manipulate the view is

-(IBAction)goBack {
    [self dismissModalViewControllerAnimated:NO];
}

-(IBAction)goForward {  
    Slide5ViewController *screen = [[Slide5ViewController alloc] initWithNibName:nil bundle:nil];
    screen.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
    [self presentModalViewController:screen animated:YES];
    [screen release];
}   
  • 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-18T00:10:39+00:00Added an answer on May 18, 2026 at 12:10 am

    Kieron,

    Why not have one “slide” view controller and a different image only? Use some sort of data structure to keep information about the buttons, images, and pathways for each slide, and then just keep re-using the same view controller for each slide?

    The view controller can then dynamically load each image as it transitions between the currently visible view and the next instantiation of itself… It should be possible using only 1 view controller.

    If you’re comfortable with using Interface Builder, keep using the XIB files to lay everything out. However, instead of setting each “File’s Owner” to a different view controller, set them all to the same one. Then, inside your IBAction methods (when the user pressed a button), use some logic to say “I am on this view right now, and the user pressed this button, so which one should I go to next?”

    Then, call a method like loadNewSlide: that might look like this:

    - (void) loadNewSlide:(NSInteger)slideNumber
    {
      // Make a string with the new XIB name
      NSString* xibName = [NSString stringWithFormat:@"slide-%d",slideNumber];
    
      // Create the next slide view controller (it doesn't matter if you create a slide view 
      // controller from within another slide view controller, remember, they are all just  
      // objects)
      SlideViewController *newSlideViewController = [[SlideViewController alloc] initWithNibName:xibName bundle:nil];
    
      // Change the view
      UIWindow *theWindow = [self.view superview];
      [self.view removeFromSuperview];
      [theWindow addSubview:newSlideViewController.view];
    
      // Release, the view stack now should be retaining the view controller instead
      [newSlideViewController release];
    }
    

    This will work MUCH better than running “modally” with 75 view controllers (as you had previously suggested) because this will only keep 1 slide in memory at a time – whatever you are currently looking at – and then will load the next slide just in time to move to it.

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

Sidebar

Related Questions

I'm putting together a sprite and have two questions. Something I've always wondered whether
I am putting together a Forum Stats website and I need to find the
I want to display very wide, panoramic images in Mobile Safari (iPhone, iPod, iPad).
Putting peoples opinions about garbage collection aside are there any deadlocking issues with the
When putting someones old javascript function on my page it makes it no longer
I'm putting in a lot of time trying to figure out how to use
I was putting the finishing touches on my app today. I created a layout-large
I am putting information from a folder into a datatable. I'm putting the info
What are the reasons putting a module in /helpers over the /lib folder in

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.