gpt4 book ai didi

iphone - 在后台填充 Objective-C 中的表格单元格(iphone)

转载 作者:塔克拉玛干 更新时间:2023-11-02 21:57:39 25 4
gpt4 key购买 nike

我在表格单元格中显示数据,并使用网络服务下载数据。
数据量巨大,下载后显示需要一定的时间。
我需要提供一些解决方案。
我正在考虑先下载一些数据,然后一旦屏幕显示信息,然后在后台下载其余数据。
在这种情况下应用程序不会显得呆滞。
如果还有其他解决方案,请指导..

谢谢!

最佳答案

你要实现这段代码

static NSString *cellIdentifier = @"LeaveRequestTableViewCell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
if(cell == nil)
{
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle
reuseIdentifier:cellIdentifier] autorelease];
}

这将使您的应用程序更快,因为只会加载手机上可见的单元格。

关于iphone - 在后台填充 Objective-C 中的表格单元格(iphone),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4644154/

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