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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T18:47:43+00:00 2026-06-17T18:47:43+00:00

So I implemented a proper TableView with a search functionality and sectionIndexTitles . Now,

  • 0

So I implemented a proper TableView with a search functionality and sectionIndexTitles. Now, I am trying to implement a UICollectionView and it is working so far, except that I can’t easily have sectionIndexTitles (the right scroll bar).

If I look at the Facebook Application, it looks like a UICollectionView, but with indeed sectionIndexTitles and a searchbar. I can’t seem to find such functions for the UICollectionView model.

Any ideas?!

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-17T18:47:44+00:00Added an answer on June 17, 2026 at 6:47 pm

    I had a similar requirement (for a horizontal collection view) and ended up building an index view subclass myself.

    I plan to open-source it but that will likely have to wait until next month, so here’s a stub to get you started:

    YMCollectionIndexView.h

    @interface YMCollectionIndexView : UIControl
    
    - (id) initWithFrame:(CGRect)frame indexTitles:(NSArray *)indexTitles;
    
    // Model
    @property (strong, nonatomic) NSArray *indexTitles; // NSString
    @property (readonly, nonatomic) NSUInteger currentIndex;
    - (NSString *)currentIndexTitle;
    
    @end
    

    YMCollectionIndexView.m

    #import "YMCollectionIndexView.h"
    
    @interface YMCollectionIndexView ()
    @property (readwrite, nonatomic) NSUInteger currentIndex;
    @property (strong, nonatomic) NSArray *indexLabels;
    @end
    
    @implementation YMCollectionIndexView
    
    - (id) initWithFrame:(CGRect)frame indexTitles:(NSArray *)indexTitles {
        self = [super initWithFrame:frame];
        if (self) {
            self.indexTitles = indexTitles;
            self.currentIndex = 0;
            // add pan recognizer
        }
        return self;
    }
    
    - (void)setIndexTitles:(NSArray *)indexTitles {
        if (_indexTitles == indexTitles) return;
        _indexTitles = indexTitles;
        [self.indexLabels makeObjectsPerformSelector:@selector(removeFromSuperview)];
        [self buildIndexLabels];
    }
    
    - (NSString *)currentIndexTitle {
        return self.indexTitles[self.currentIndex];
    }
    
    #pragma mark - Subviews
    
    - (void) buildIndexLabels {
        CGFloat cumulativeItemWidth = 0.0; // or height in your (vertical) case
        for (NSString *indexTitle in self.indexTitles) {
                // build and add label
            // add tap recognizer
        }
        self.indexLabels = indexLabels;
    }
    
    #pragma mark - Gestures
    
    - (void) handleTap:(UITapGestureRecognizer*)recognizer {
        NSString *indexTitle = ((UILabel *)recognizer.view).text;
        self.currentIndex = [self.indexTitles indexOfObject:indexTitle];
        [self sendActionsForControlEvents:UIControlEventTouchUpInside];
    }
    
    // similarly for pan recognizer
    
    @end
    

    In your view controller:

    - (void)viewDidLoad {
        [super viewDidLoad];
        [self.collectionIndexView addTarget:self action:@selector(indexWasTapped:) forControlEvents:UIControlEventTouchUpInside];
        // similarly for pan recognizer
    }
    
    - (void)indexWasTapped:(id)sender {
        [self.collectionView scrollToIndexPath:...];
    }
    
    // similarly for pan recognizer
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I implemented the Facebook registration on my website. Everything works fine except that suddenly
Can I enumerate all native methods in java, those that have to be implemented
What is the proper way to implement assignment by value for a reference type?
I am a little confused on the proper way to implement an NSObject model.
I'm trying to implement the GeocodableBehavior on a Symfony 1.4 (with Propel 1.6 )
I implemented class that serves as TcpCLient server. Looks like this: { [Export] public
I've implemented a UserProfile model (as the Django 1.2 docs say is the proper
i am new in this Field.I have implemented BarCode Scanner.I have got the Proper
I am trying to understand how is iterating through a hashtable implemented. I just
I'm using django-nonrel on GAE. For now update queries are not implemented in django-nonrel

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.