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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T04:42:32+00:00 2026-06-15T04:42:32+00:00

Lets assume we have ten pages. An event handler for the event is added

  • 0

Lets assume we have ten pages.

An event handler for the event is added as below:

Run the app.
Now in the ten pages, by default page 1 (index 0) is selected. Touch the second page or third page. The event wont be triggered. If the last page is selected, the event will be triggered. The same happens with last page. Once you have selected the last page, select the previous page. The event will not be triggered, but if you select the first page, the event will not be triggered.

To see an easy demonstration of this case, download the UICatalog example and open the ControlsViewController.m and change the UIControlEventTouchUpInside to UIControlEventValueChanged in line no 375.

- (UIPageControl *)pageControl
{
    if (pageControl == nil) 
    {
        CGRect frame = CGRectMake(120.0, 14.0, 178.0, 20.0);
        pageControl = [[UIPageControl alloc] initWithFrame:frame];
        [pageControl addTarget:self action:@selector(pageAction:) forControlEvents:UIControlEventValueChanged];

        // in case the parent view draws with a custom color or gradient, use a transparent color
        pageControl.backgroundColor = [UIColor grayColor];

        pageControl.numberOfPages = 10; // must be set or control won't draw
        pageControl.currentPage = 0;
        pageControl.tag = kViewTag; // tag this view for later so we can remove it from recycled table cells
    }
    return pageControl;
}
  • 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-15T04:42:33+00:00Added an answer on June 15, 2026 at 4:42 am

    You might be misunderstanding how the page control works. It is a visual indicator of the number of pages present, but tapping on a particular dot doesn’t go to that page. You only ever move one page at a time, tapping on the left half moves back a page, and on the right half moves forward a page.

    If you’re on the first page, and you tap on the left half, you can’t move back another page, so nothing happens.

    I don’t really like that behaviour, particularly on the iPad, so usually use a subclass or my own touch handling to work out if the touch location is to the left or right of the currently selected page, and send the event appropriately.

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

Sidebar

Related Questions

Lets assume I have several <span class='remove-type'> elements on a page. In jQuery document.ready
I have a .jsp page that passes the variable from the servlet. Lets assume
Lets assume I have created a facebook app.So all those who(Admin) have facebook fan
lets assume I have the following array: a = {1; 'abc'; NaN} Now I
Lets assume I have the following layout (see image below)... I have a header
Lets assume you have a app that opens a socket port for communication purposes.
Lets assume I have 2 XML variables in SQL Server 2008 with the following
Lets assume I have the following 3 entities: Customer,Order,Product which interact in the View
Lets assume we have a class car. How would You name parameters of function
Lets assume we have the following code: abstract class Base1 { protected int num;

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.