Program received signal: “0”
Want to implement the application like Season's Greeting http://itunes.apple.com/us/app/seasons-greeting/id345499393?mt=8
But i am getting the following error when i have ad开发者_如何学JAVAded multiple imagesViews in UIScrollView:
Program received signal: “0” warning: check_safe_call: could not restore current frame
I have already added images as a .png files and i have also used
[[NSBundle mainBundle] pathForResource:[NSString stringWithFormat:@"Template1"]
ofType:@"png"];
UIImage* templateImg = [UIImage imageWithContentsOfFile:templateName];
[templateArray addObject:templateImg];
UIImageView* imgView = [[UIImageView alloc] initwithimage:templateImg];
[scrollView addSubview:imgView];
When i added 25 imgView as above my app is crashed on iPhone Simulator and iPhone.
Looking at the crash log it appears the device is complaining about low memory. The code that is showing this behavior only shows it on 3.0, for me. This never happened on 2.x with the exact same code.
Run your app under Instruments and see how much memory you are actually using. It sure sounds like you are running out of it.
One way to limit the memory usage would be to use lazy loading in your scrollview: only load and display those image views that are actually visible.
精彩评论