Comments (5)
你好,请问页面是否有重用的情况,也就是说是否有调用方法dequeueReusablePageWithIdentifier:?请确保页面的初始化符合demo中的规范,我们项目中有多重VTMagic嵌套,设计更加复杂,仍能很好地控制内存,或者你可以用instruments跟踪一下内存开销出在哪个地方。此外,在有大量数据的情况下,我们应该尽可能从数据库中读取缓存数据(比如页面重用时),而不是直接全部保存到内存中。
from vtmagic.
您好,谢谢您的回复。dequeueReusablePageWithIdentifier用了。框架中一进入就加载了所有页面的数据,VTMagic是否有方法控制滑动后再加载,滑到的页面呢
from vtmagic.
你好,子控制器中的viewDidAppear:等方法对你应该有用,其调用逻辑与系统一致,viewDidAppear:在页面真正显示时触发,viewWillDisappear:在页面即将消失时触发,另外两个方法可依此类推。此外,vtm_prepareForReuse方法会在页面被重用时触发,你或许需要在这里修正一下页面偏移或者清除一下旧数据。demo中用的是假数据,所以在viewDidLoad方法中完成的数据加载,最近几天我会完善一下demo中的示例,以供大家参考。
from vtmagic.
好的,再次感谢!找到原因了,不知道是不是本质原因。API接口返回了3图的cell时,每张gif图片的大小都在2M中,当我把图片改为100k内,内存突然降到24M中。cell上传的图片对加载和读取,这么占用内存啊?
from vtmagic.
gif图通常由多张图片合成,所以占用内存一般会比较大-_-!!
from vtmagic.
Related Issues (20)
- pod 'VTMagic', '~> 1.2.4' 但是不适配iPhone X HOT 2
- 第一个menu可以固定在左侧吗?
- 当有三个子视图控制器的时候,preloading=yes,发生pageIndex错乱,导致崩溃
- iPhone X leftNavigatoinItem and rightNavigatoinItem HOT 6
- item之间的竖向分割线如何实现 HOT 1
- VTMagic.m Assigning instance variable to itself
- menubar里选中的Item的字体大小变化
- 能不能竖向滑动? HOT 1
- Request for swift version
- 用MLeaksFinder检测出内存泄漏,如下图
- navigationInset 不起作用,有遇到的朋友吗?
- 怎么设置item的选中和非选中时的backgroundColor
- 滑动监听
- Xcode 11.3 UITableView:Warning once only: UITableView was told to layout its visible cells and other contents without being in the view hierarchy HOT 2
- VTMagic与hidesBarsOnSwipe冲突
- 在 VTMagic 控制器中 修改 navigationBar 的 BarTintColor 无效 HOT 1
- VTSwitchEventScroll时不会resetMenuItemColor,可能造成Item的颜色不对。
- 你好,请问能不能改变navigationView的位置,使他悬浮在中间?这样的话改变他的透明度可以看到子控制器的UI
- 气泡模式自定义问题
- VTMagicController生命周期 统计问题
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vtmagic.