- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:
(NSInteger)section{
return [array_name count];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:
(NSIndexPath *)indexPath{
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:
@"cell"];
if (cell == nil) {
cell = [[UITableViewCell alloc]initWithStyle:
UITableViewCellStyleSubtitle reuseIdentifier:@"cell"];
}
//UIImage *cellImage = [UIImage imageNamed:[imagesarray objectAtIndex:indexPath.row]];
//cell.imageView.image = cellImage;
cell.textLabel.text= [array_name objectAtIndex:indexPath.row];
cell.detailTextLabel.text=[array_address objectAtIndex:indexPath.row];
return cell;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
if([UIScreen mainScreen].bounds.size.height == 568.0)
{
return 70;
}
else
{
return 60;
}
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:
(NSIndexPath *)indexPath{
position=indexPath.row;
DetailsView *rslt=[[DetailsView alloc]init];
[self presentViewController:rslt animated:YES completion:nil];
}
No comments:
Post a Comment