我是iOS开发人员的新手,使用Storyboard
我从网址获取Image
并在滚动tableview
表时将图片加载到 UITableviewcell 将滚动非常缓慢并且滚动。
答案 0 :(得分:3)
在这里查看以下链接,你应该使用延迟加载,
Lazy load images in UITableView
Loading images from a URL into a UITableViewCell's UIImageView
答案 1 :(得分:0)
您应该在单元格中使用延迟加载图像。由于您正在主线程或UI线程中获取图像(..网络活动),因此发生了缓慢或卡住。
你可以在net中获得很多教程来加载图像异步。 以下是Apple的教程:link
答案 2 :(得分:0)
请参阅AsynchImage的这个问题的答案.. iphone-download-asynchronous
也使用AsynchImage下载图像并在UITableViewCell中设置为图像