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

  • Home
  • SEARCH
  • 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 6193533
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T03:08:14+00:00 2026-05-24T03:08:14+00:00

I have a XIB file (view) that has a toolbar and a view right

  • 0

I have a XIB file (view) that has a toolbar and a view right below it, as illustrated in the image below:

Desired View

You can also view the image here.

I am using the following PhotoScroller: http://developer.apple.com/library/ios/#samplecode/PhotoScroller/Introduction/Intro.html

The problem is that the PhotoScroller is dynamically created into the method loadView and directly assigned to its own view. That makes the PhotoScroller fills up the entire screen, which is not what I want.

I want to be able to put the PhotoScroller only inside the view that is below the toolbar (that is, the view numbered 2 in the picture above).

I think I have to load the view that is inside the XIB file and assign the PhotoScroller to that view. However, I have no idea how to do that (or if that`s even the solution).

How could I do that?

PS: Even though the number 2 shows a list, it is not a list! Its just a simple blank view (I just couldnt find a better image to put here).

Thank you in advance! 🙂

  • 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-24T03:08:15+00:00Added an answer on May 24, 2026 at 3:08 am

    Instead of doing

    self.viewPanels = pagingScrollView
    

    try to do (this will work only if you also add viewPanels as a subview to self.view):

    [self.viewPanels addSubview:pagingScrollView];
    

    I think that you should also modify or override the implementation of frameForPagingScrollView that comes with the Apple sample:

    - (CGRect)frameForPagingScrollView {
      CGRect frame = [[UIScreen mainScreen] bounds];
      frame.origin.x -= PADDING;
      frame.size.width += (2 * PADDING);
      return frame;
    }
    

    as you see, here the frame is pretty hardcoded respect to the screen size; in your case the frame will be shorter, so you should change the height also.

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

Sidebar

Related Questions

I have a View Controller inside my MainWindow.xib file that loads the nib Cover
Hello I have a view controller that loads from an xib i created. It
I have an iPhone app that shows a simple view (View 1) that has
I made a tab bar application that has only one xib file. If you
i have created a project which has different xib viewcontrollers.In first view am selecting
I have a XIB (RootViewController) that has actions I want to do from a
I have more than 3 views and also one window view ( pdfReader.xib nib
I have a .xib file containing a UIView and 2 UILabel subviews linked to
If I have something like a UILabel linked to a xib file, do I
In my iPhone app I have a UIViewController that has a UITableView and another

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.