在 iOS 中,我基本上想按如下方式显示图像:
我需要一个表中的 2 列。第一列中的图像是固定的,第二列中的行应该具有水平滚动以滚动图像。在选择图像时,它应该转到另一个视图。
在 iOS 中,我基本上想按如下方式显示图像:
我需要一个表中的 2 列。第一列中的图像是固定的,第二列中的行应该具有水平滚动以滚动图像。在选择图像时,它应该转到另一个视图。
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease];
}
if(indexPath.row == 0){
//Normar cell
}else if(indexPath.row == 1){
//add ScrollVeiw
}
}
和单元格的高度
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
if (indexPath.row == 1) {
//height for scrollview
}
}
希望这会帮助你。
一切顺利 !!!