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