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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T08:31:14+00:00 2026-06-16T08:31:14+00:00

I am trying to implement a horizontal uiscrollview. I want the user to the

  • 0

I am trying to implement a horizontal uiscrollview. I want the user to the be able to swipe to the next view and I am not concerned about the user knowing what page they are on (there are only 2 views). I believe they call this page control.

So in my IB I have a default view which then I have added a UIScrollView into it and linked its referencing outlet (called scrollView). I have put all the UILabels and images that were previously in the default view into the scrollView.

I then created another empty view by dragging it into IB and linked it as well calling it newView. It is a separate object and not put into the default view.

Then in my view controller viewDidLoad I use the following code:

  [self->scrollView setScrollEnabled:YES];
[self->scrollView setDelegate:self];
self->scrollView.backgroundColor = [UIColor clearColor];
[self->scrollView setShowsHorizontalScrollIndicator:NO];
[self->scrollView setIndicatorStyle:UIScrollViewIndicatorStyleDefault]; scrollView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
scrollView.contentMode = UIViewContentModeScaleToFill;
[self->scrollView setContentSize:CGSizeMake(1300.0,0)];
[self.view addSubview:scrollView];

It does not work. Can anyone explain what I am doing wrong?

Thanks!

enter image description here

  • 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-06-16T08:31:17+00:00Added an answer on June 16, 2026 at 8:31 am

    Just remove following line from your code:

    [self->scrollView setShowsHorizontalScrollIndicator:NO];
    

    Also you don’t required :

    [self->scrollView setIndicatorStyle:UIScrollViewIndicatorStyleDefault]; scrollView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
    

    And add

    [self->scrollView setContentSize:CGSizeMake(1300.0,200.0)];
    

    Also set xib to its default settings

    Try this this should work.

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

Sidebar

Related Questions

I've implemented horizontal page view with many images. And I'm trying to create a
Trying to implement 3-layer (not: tier, I just want to separate my project logically,
I'm trying to implement horizontal parallax on a paging scroll view which makes it
I want to implement scrolling(horizontal) on my custom view which i have set in
I'm trying to implement a grid view menu, with horizontal background scroll of three
I'm trying to implement a horizontal dropdown menu into my website and I've run
I'm trying to implement a simple horizontal navigation menu that just shows a single
I'm trying to implement a login view where several EditTexts and a logo are
I'm trying to implement a click-like effect on my horizontal tab menu using opacity
I'm trying to use the open source STHorizontalPicker library to implement a horizontal picker

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.