小编use*_*149的帖子

UITableView iOS中的sectionForSectionIndexTitle

我刚刚开始使用ios,而且我很困惑UITableView.

我想在视图的右侧实现索引栏.我已经实现了这个,但当我点击索引栏上的部分时,它无法正常工作.

这是我的代码.这indexArray是"AZ"元素,finalArray是我的UITableView可变数组.

请告诉我应该实施什么sectionForSectionIndexTitle.

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
    return [finalArray count];
}

- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:         (NSInteger)section
{
    return [finalArray objectAtIndex:section];
}

- (NSArray *)sectionIndexTitlesForTableView:(UITableView *)tableView
{
    return indexArray;
}

- (NSInteger)tableView:(UITableView *)tableView sectionForSectionIndexTitle:   (NSString *)title atIndex:(NSInteger)index
{

}
Run Code Online (Sandbox Code Playgroud)

tableview ios

4
推荐指数
1
解决办法
6258
查看次数

如何从Ios 6中的用户获取键入地址的纬度和经度

我是Ios的新人.我正在学习MapKit和CoreLocation.我的程序中有两个视图控制器,在第一个视图控制器中有一个文本字段,用户可以键入一个地址.和一个按钮.填写地址后,如果用户点击按钮,它将重定向到第二视图控制器,即地图视图控制器.将有两个注释.一个用于用户的当前位置,另一个用于用户的键入地址.所以,请你告诉我如何获取lat,长期用户输入的地址,并在地图视图上显示该纬度的注释.

提前致谢.

map core-location ios

3
推荐指数
1
解决办法
7236
查看次数

标签 统计

ios ×2

core-location ×1

map ×1

tableview ×1