我从 Web获取JSON MutableArray包含 YouTube URL 字符串..
目的是在每个单元格中执行UIWebView
。
我的代码:如何实现代码?谢谢。
@property (nonatomic, strong) NSMutableArray* arrMovies;
@synthesize arrMovies;
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MyIdentifier"];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@"MyIdentifier"];
cell.selectionStyle = UITableViewCellSelectionStyleBlue;
}
cell.textLabel.text = [[self.arrMovies objectAtIndex:indexPath.row] valueForKey:@"title"];
cell.detailTextLabel.text = [NSString stringWithFormat:@"%@ views | Duration: %i",
[[self.arrMovies objectAtIndex:indexPath.row] valueForKey:@"viewCount"],intMinutes];
return cell;
}