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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T18:01:31+00:00 2026-05-17T18:01:31+00:00

Sorry if I missed anything about this but I have a table view with

  • 0

Sorry if I missed anything about this but I have a table view with 2 large sections and an index to navigate between sections:

- (NSArray *)sectionIndexTitlesForTableView:(UITableView *)tableView {
    NSMutableArray *listArray = [[NSMutableArray alloc] init];
    listArray = [NSArray arrayWithArray:[@"S|H"componentsSeparatedByString:@"|"]];
    return listArray;}

Since I only have 2 sections the top index “S” is at the top and “H” is at the extreme bottom of the screen.

Is there any way to reposition those two index letters to be located at the center? (or at least near each other)

Thanks

  • 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-17T18:01:31+00:00Added an answer on May 17, 2026 at 6:01 pm

    I don’t think so – positioning the labels is really up to the OS, and finally it meets user expectation.

    Your code leaks an NSMutableArray though, as you first alloc/init an array, and then reassign the variable to another array.

    Also, arrayWithArray: is overkill here.

    Make it

    NSArray *listArray = [@"S|H"componentsSeparatedByString:@"|"];
    

    or better yet

    NSArray *listArray = [NSArray arrayWithObjects:@"S", @"H", nil];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Sorry this is a basic question, but all my research just barely missed answering
This question may have been asked before and I'm sorry if I missed it,
Sorry if I missed something and this is a silly question...but can I enter
I have asked this question before but without a trace or answer. Sorry if
Sorry I missed and deleted earlier question on accident again. I have a situation,
I'm sorry if this question is a bit basic, or if I've missed an
Sorry for this simple question, but I can't solve it... There is an example:
Sorry, I know this question is easy, but I don't know how to get
Sorry but I am not sure how to ask this question but I am
I recognise this is a popular question but I couldn't find anything that answered

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.