Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 08-29-2009, 05:38 AM   #1 (permalink)
Registered Member
 
Join Date: Aug 2009
Posts: 8
albertdt6 is on a distinguished road
Exclamation Indexed table doesn't work! HELP

I put a indexed table in my project like this:
Code:
- (NSArray *)sectionIndexTitlesForTableView:(UITableView *)tableView {
    return [NSArray arrayWithObjects:@"A", @"B", @"C", @"D", @"E", @"F", @"G", @"H", @"I", @"K", @"L", @"M", @"N", @"P", @"R", @"S", @"T", @"U", @"V", nil];
}
I know that I have to put another code for make it functional but I don't know the code. Can anyone answer me the code and example please?

Thank you!
albertdt6 is offline   Reply With Quote
Old 08-29-2009, 09:03 AM   #2 (permalink)
Emphasizing Fundamentals
 
BrianSlick's Avatar
 
Join Date: Jul 2009
Location: NoVA / DC Area
Age: 36
Posts: 7,990
BrianSlick has a spectacular aura about
Default

tableView:sectionForSectionIndexTitle:atIndex: ?

What do you mean by 'make it functional'? It should already be working.
__________________
BriTer Ideas LLC - Professional iOS App Development. Available for hire.

SlickShopper 2 | Free NSLog utility | Leave a PayPal donation.

Are you a newbie? Things you should read:
Definitive Guide To Properties | UITableView Series | Guide To Troubleshooting | Model Object Overview

Do you sit at a desk all day? Walk instead! Follow along with my treadmill desk adventures.
BrianSlick is offline   Reply With Quote
Old 08-29-2009, 09:13 AM   #3 (permalink)
Registered Member
 
Join Date: Aug 2009
Posts: 8
albertdt6 is on a distinguished road
Exclamation How?

Quote:
Originally Posted by BrianSlick View Post
tableView:sectionForSectionIndexTitle:atIndex: ?

What do you mean by 'make it functional'? It should already be working.
Yes, it appears but it doesn't work. For exemple, I have a list of countries and when the letter B is push it I want to go to the section of countries beginning with letter B, but i don't know the code. Can you give me the code and a exemple how i have to do it, please?

Thank you very much!
albertdt6 is offline   Reply With Quote
Old 08-29-2009, 09:15 AM   #4 (permalink)
Emphasizing Fundamentals
 
BrianSlick's Avatar
 
Join Date: Jul 2009
Location: NoVA / DC Area
Age: 36
Posts: 7,990
BrianSlick has a spectacular aura about
Default

Each letter you display needs to correspond to a section in the table. So if you have 26 letters, then you should have 26 sections. If you just have 1 long section, the index isn't going to do much good for you. You will need to rearrange your data into sections.
__________________
BriTer Ideas LLC - Professional iOS App Development. Available for hire.

SlickShopper 2 | Free NSLog utility | Leave a PayPal donation.

Are you a newbie? Things you should read:
Definitive Guide To Properties | UITableView Series | Guide To Troubleshooting | Model Object Overview

Do you sit at a desk all day? Walk instead! Follow along with my treadmill desk adventures.
BrianSlick is offline   Reply With Quote
Old 08-29-2009, 09:47 AM   #5 (permalink)
Registered Member
 
Join Date: Aug 2009
Posts: 8
albertdt6 is on a distinguished road
Exclamation How?

Quote:
Originally Posted by BrianSlick View Post
Each letter you display needs to correspond to a section in the table. So if you have 26 letters, then you should have 26 sections. If you just have 1 long section, the index isn't going to do much good for you. You will need to rearrange your data into sections.
So, I would like to group the country list into alphabetic section like the image. How I have to do it?
albertdt6 is offline   Reply With Quote
Old 08-29-2009, 10:53 AM   #6 (permalink)
Emphasizing Fundamentals
 
BrianSlick's Avatar
 
Join Date: Jul 2009
Location: NoVA / DC Area
Age: 36
Posts: 7,990
BrianSlick has a spectacular aura about
Default

You have to organize your data that way. You will probably wind up with an array containing many arrays.
__________________
BriTer Ideas LLC - Professional iOS App Development. Available for hire.

SlickShopper 2 | Free NSLog utility | Leave a PayPal donation.

Are you a newbie? Things you should read:
Definitive Guide To Properties | UITableView Series | Guide To Troubleshooting | Model Object Overview

Do you sit at a desk all day? Walk instead! Follow along with my treadmill desk adventures.
BrianSlick is offline   Reply With Quote
Old 08-29-2009, 10:58 AM   #7 (permalink)
Registered Member
 
Join Date: Aug 2009
Posts: 8
albertdt6 is on a distinguished road
Exclamation How?

Quote:
Originally Posted by BrianSlick View Post
You have to organize your data that way. You will probably wind up with an array containing many arrays.
But, how I have to do it?

Can you give me the code with an exemple and then I'm going to try it, please?
albertdt6 is offline   Reply With Quote
Reply

Bookmarks

Tags
code, indexed, indexed table, table

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 323
13 members and 310 guests
chiataytuday, coolman, givensur, glenn_sayers, guusleijsten, ipodphone, jbro, mediaspree, mottdog, mtl_tech_guy, Punkjumper, vilisei, whitey99
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,649
Threads: 94,114
Posts: 402,883
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Anwerbl
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 09:29 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0