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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:06:16+00:00 2026-06-13T09:06:16+00:00

On the iPhone you can switch between different home screens in three different ways.

  • 0

On the iPhone you can switch between different home screens in three different ways.

  1. You can swipe to the left or to the right and the next respectively next screen will be animated in.

  2. You touch the screen and without lifting the finger you drag the screen to the right or to the left. After passing critical point (which is a distance more then halve the screen) the next homescreen is animated in when you lift your finger.

  3. You touch the screen and without lifting the finger you drag the screen a little, if you want you can stop dragging but still don’t left the finger. And you can accelerate to the left or right on a relatively short distance and it will animate to the respective screen to the left or right.

If we mutual exclusively look at the points 1 and 2, we find them trivial to implement. It’s just a UISwipeGuestureRecognizer for point 1. and a UIPanGuestureRecognizerfor 2.

Combining 1 and 2 them seems somehow not so trivial, since the swiping seems to dominate (I tried to combine them with - (void)requireGestureRecognizerToFail:(UIGestureRecognizer *)otherGestureRecognizer). To trigger the pan I had to lay my finger on the screen and drag very very soft to not trigger the swipe.

Not to speak of point three as an addition. This seems totally out of order for my state of knowledge.

Any advice around here? Thank you very much in advance. If more information is needed to solve this question I will gladly deliver it.

  • 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-13T09:06:17+00:00Added an answer on June 13, 2026 at 9:06 am

    The home screen is just an UIScrollView with UIPageControl
    It’s that easy 🙂

    Example :

    // MyViewController.h
    @interface MyViewController : UIViewController <UIScrollViewDelegate> {
        UIScrollView *_scrollView;
        UIPageControl *_pageControl;
    }
    
    // MyViewController.m
    // in your viewDidLoad method
    int numberOfPages = 3;
    _scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width,
                                                                     self.view.frame.size.height)];
     [_scrollView setContentSize:CGSizeMake(numberOfPages*_scrollView.frame.size.width, _scrollView.frame.size.height)];
     [_scrollView setPagingEnabled:YES];
     [_scrollView setShowsHorizontalScrollIndicator:NO];
     [_scrollView setDelegate:self];
     [self.view addSubview:_scrollView];
    
     _pageControl = [[UIPageControl alloc] initWithFrame:CGRectMake(0, _scrollView.frame.size.height-30, _scrollView.frame.size.width, 20)];
     [_pageControl setNumberOfPages:numberOfPages];
     [_pageControl setCurrentPage:0];
     [self.view addSubview:_pageControl];
    
    for (int i=0; i<numberOfPages; i++) {
       CGRect frame = _scrollView.frame;
       frame.origin.x = frame.size.width * i;
       frame.origin.y = 0;
       UIView *view = [UIView alloc] initWithFrame:frame];
       //Setup your view     
       [_scrollView addSubview:view];
    }
    

    If you want to execute specific method regarding current view displayed, use the scrollViewDidScroll: method (for example to load content from database)

    - (void)scrollViewDidScroll:(UIScrollView *)sender {
        CGFloat pageWidth = _scrollView.frame.size.width;
        int page = floor((_scrollView.contentOffset.x - pageWidth / 2) / pageWidth) + 1;
        _pageControl.currentPage = page;
    
        //do whatever you want..
    }
    

    It’s just an example to show you how you could do. If you’re using database or if each view is different you should proceed differently to setup your views or retrieve data but the logic would be the same…

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

Sidebar

Related Questions

I'm currently using the AdWhirl SDK for the iPhone so I can switch Ad
I'd like to make my iPhone app to be able to switch between skins
I have an iPhone app that has several different view controllers. A login screen
Can i switch off the iPhone by the programming if yes then how?
When a user moves their iPhone, my views switch appropriately between portrait and landscape
Possible Duplicate: Which conditional compile to use to switch between Mac and iPhone specific
If I put ios 6 beta on my iphone can I still develop and
I'm trying to figure out if an iPhone can connect to another non-iPhone device
My iPhone app can't seem to use soft keyboards that doesn't use the US-like
After update our iphone app can not access the keychain. The distribution certificate has

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.