こんにちは、私はiOSの初心者です。Image of Tableviewセル
私はViewController1でテーブルビューを実装しました。テーブルビューでは、セルのtittle、detailText、およびdisclosureインジケータを表示しています。
- (UITableViewCell *)tableView:(UITableView *)tableView
cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *MyIdentifier = @"MyIdentifier";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:MyIdentifier];
if (cell == nil)
{
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1
reuseIdentifier:MyIdentifier];
}
cell.textLabel.text =[listTableArray objectAtIndex:indexPath.row];
cell.textLabel.textColor=[UIColor grayColor];
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
[email protected]"4mile";
return cell;
}
すべてが今、私は私がすることなく、開示インジケーターと一緒に、両方の画像を必要とするimage.Butに置き換えられ
UIImageView *accessoryView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 20, 20)];
accessoryView.image=[UIImage imageNamed:@"list.png"];
cell.accessoryView = accessoryView;
ディスクロージャー・インジケータでそれを行う際に開示インジケーター前の画像を必要とし、正常に動作しますカスタムセルを使用します。
どうすればいいですか?私を助けてください。
おかげ
あなたがあなたのimageView
セルのcontentView
とに追加する必要がある標準UITableViewCell
にUIImageView
を追加したい場合は、私がイメージ
を試みるところ本当にカスタムセル – Birendra
を表示するためにスクリーンショットを提供してくださいスクリーンショット –
@Birendra追加すべき画像 – remyr3my