ios - UITableView tapping index doesnt scroll to section -
i have tableview have implemented section headers , have section titles appearing along right hand side. however, when tap index doesn't scroll section though can see in logs returning right section.
here method tableview:sectionforsectionindextitles:atindex
- (nsinteger)tableview:(uitableview *)tableview sectionforsectionindextitle:(nsstring *)title atindex:(nsinteger)index { nslog(@"title: %@", title); nslog(@"index: %d", index); homecoming [[uilocalizedindexedcollation currentcollation] sectionforsectionindextitleatindex:index]; } any help great, thanks.
if want create alphabets scroll. helps.
-(void)viewdidload { //section index in tableview alphabetsarray = [[nsarray alloc] initwithobjects:@"#",@"a",@"b",@"c",@"d",@"e",@"f",@"g",@"h",@"i",@"j",@"k",@"l",@"m",@"n",@"o",@"p",@"q",@"r",@"s",@"t",@"u",@"v",@"w",@"x",@"y",@"z", nil]; } -(nsarray *)sectionindextitlesfortableview:(uitableview *)tableview { homecoming alphabetsarray; } ios iphone uitableview
No comments:
Post a Comment