开发者

Application User interface disappearing after a while

开发者 https://www.devze.com 2023-03-28 11:55 出处:网络
basically I got this application which I wrote and for some reason behaves differently on a different ios device.

basically I got this application which I wrote and for some reason behaves differently on a different ios device.

On my Itouch it works fine for a very long time without issues but on an iphone 4 with the latest firmware, the UI degrades after a while, i.e some images start getting unloaded and I checked the memory profiler and it never goes above 4mb. Also the memory warnings are never called. Even the locking screen loses its numberpad and becomes semi transparent.

Before that happens, the screen will flicker a little.

The application basically uploads images to some db and before doing th开发者_开发问答at it will run the jpeg compression a couple of times to make sure the image is close to 50kb, so if you start with an image which is 500kb, it will decrement its compression ratio until the image is close to 50kb. Do you think this might be causing an issue.

I cannot replicate this issue on my itouch with 4.2 but on the iphone4, it seems to happen.

Any pointers will be good. Instruments show maybe 1-2 minor leaks of up to 64bytes and the heap never goes above 4mb.


It's hard to know without seeing your actual code. To me though, I'd start by fixing the leaks and seeing if that improves things. In terms of iOS device, your iPhone 4 has more RAM than the touch so - I'd wager it isn't a memory availability problem as your touch should be the one exhibiting issues first. This is backed up by the fact you are not receiving memory warnings.

Off the top of my head, I don't know what the issue could be; I haven't heard of it myself. Unfortunately, without sample code it's hard to say what is going on.

Are you using custom interface elements? Does the degradation happen with Apple UIKit elements too, like UISlider?

How are these images being loaded? If you are using lazy loading, you might have bugs I your instantiation code.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号