yaqinking / konachan-ios Goto Github PK
View Code? Open in Web Editor NEWA Konachan/yande.re images browser for iOS
License: MIT License
A Konachan/yande.re images browser for iOS
License: MIT License
設置:
上下來回滑動速度很快的時候 100% 引起 crash。
大概原因能猜到是因爲內存佔用過高。
解決方法是:
給 SDWebImage 設定最大內存緩存佔用數值
// 在 viewDidLoad: 里
[[SDImageCache sharedImageCache] setMaxMemoryCost:[self deviceMaxMemoryCost]];
- (NSInteger)deviceMaxMemoryCost {
unsigned long long physicalMemory = [NSProcessInfo processInfo].physicalMemory;
NSInteger allowedMaxMemory = physicalMemory*0.5/4;
return allowedMaxMemory;
}
由於 SDWebImage 使用 NSCache 作爲緩存,而 NSCache 佔用的內存並不會在 Xcode Debug Seesion Tab 的 Memory Usage 里顯示出來,需要使用在 Instruments 里才能看到是 CG raster data 在佔用大量的內存,設定好上面的值讓它在 iOS 系統單個 app 的最大 limit 值內之後,解決。上面設置爲設備最大內存的一半
刚才改了下代码,tag输入空完美使用,不需要再改其他代码。
另外konachan和yande的api现在都支持https了。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.