gpt4 book ai didi

ios - 将图像添加到表格单元格 (iOS)

转载 作者:技术小花猫 更新时间:2023-10-29 11:14:25 26 4
gpt4 key购买 nike

我正在尝试做一些类似于 twitter 或 Facebook 的事情。

最佳答案

- (UITableViewCell*)tableView:(UITableView*)tableView cellForRowAtIndexPath:(NSIndexPath*)indexPath 
{
static NSString* CellIdentifier = @"Cell";

UITableViewCell* cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil)
cell = [[[UITableViewCell alloc] UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];

cell.textLabel.text = @"I'm a UITableViewCell!";
cell.imageView.image = [UIImage imageNamed:@"MyReallyCoolImage.png"];

return cell;
}

归功于 Thomas Moore

adding images to UItableView

关于ios - 将图像添加到表格单元格 (iOS),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5212134/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com