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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T02:52:36+00:00 2026-05-20T02:52:36+00:00

Hi I am trying to implement Photos.app like application, in which on the below

  • 0

Hi I am trying to implement Photos.app like application, in which on the below toolbar we can have the page change buttons for scrolling. So, I have put one button for scrolling to the first page and one button for the last page. And two buttons for next and previous pages scrolling.

[[self.toolbarItems lastObject] setEnabled:NO];

I am changing the state of the button items by putting something similar to the above line of code. But this requires for me to keep track of the page number’s and the buttons whose status needs to the changed. e.g If I am on the last page then , the last page button needs to disable but it has to be enabled in other pages.

Is there a better way of changing the button status based on the page number ? ( instead of counting pages and changing button status.)

  • 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-20T02:52:36+00:00Added an answer on May 20, 2026 at 2:52 am

    Not fully sure I understand the question, but presumably you have to know what photo you’re on. Make that a NSNumber property, then use a custom setter to know when the photo number is changing and adjust the buttons:

    - (void) checkToolBar: (NSNumber *) pageNumber {
        int page = [pageNumber intValue];
        [[self.toolbarItems objectAtIndex:0] setEnabled: (page !=0)];
        [[self.toolbarItems objectAtIndex:1] setEnabled: (page !=0)];
        [[self.toolbarItems objectAtIndex:2] setEnabled: (page != [photos count]];
        [[self.toolbarItems objectAtIndex:3] setEnabled: (page != [photos count]];
     }
    
    
    - (void)setNumPage:(NSNumber *)newPage {
      if (numPage != newPage) {
        [numPage release];
        numPage = [newPage retain];
        [self checkToolBar:numPage];
      }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my page i'm trying to show two images which have the same id.
I am now trying to implement a app like picking image and video from
I trying to implement OAuth2.0 to my app and I got a problem, which
I am currently trying to implement a photo picker just like the Photo App
Trying to implement a UITableView of names similar to the built-in Contacts iPhone app
im trying to implement a custom error page, what i want to be able
I'm trying to implement something like a photo carousel in jQuery. This carousel could
I'm trying to implement an image zoom effect, a bit like how the zoom
I wonder whether someone can help me please. I'm trying to implement the mysql_insert_id()
I have been trying to implement this code , where i capture a image

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.