码迷,mamicode.com
首页 > 移动开发 > 详细

iOS swift lazy loading

时间:2015-06-08 19:42:40      阅读:220      评论:0      收藏:0      [点我收藏+]

标签:ios

Why bother lazy loading and purging pages, you ask? Well, in this example, it won’t matter too much if you load all the pages at the start, since there are only five and they won’t be large enough to eat up too much memory. But imagine you had 100 pages and each image was 5MB in size. That would take up 500MB of memory if you loaded all the pages at once! Your app would quickly exceed the amount of memory available and be killed by the operating system. Lazy loading means that you’ll only have a certain number of pages in memory at any given time.

iOS swift lazy loading

标签:ios

原文地址:http://blog.csdn.net/leochang130731/article/details/46415329

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!