Take the 2-minute tour ×

I'm going mad to try to figure out this problem and how to fix it. Basically I have an iPad app where I use sometime TTThumbsViewController and sometimes TTPhotoViewController, lunched by TTLauncherView. Everything works fine, I have to figure out some memory problem, but this is another story. The problem is when I use TTThumbsViewController everything works fine, when I use TTPhotoViewController on the simulator works great on the device crashes badly. If I use the code from the example TTCatalog, so images taken from internet it works fine, if they are local crashes. I see also a weird behavior the bottom navigation arrows work, but when I reach the beginning or the end I exptect one of them turn grey but they are still enable. I copy the exact file from the example TTCatalog but no lucky. Here the code: import

 @interface PhotoBrowseViewController : TTPhotoViewController { NSMutableArray* data; NSArray    *parameter; }

@property (nonatomic, retain) NSArray parameter; @property (nonatomic, retain) NSMutableArray data;

import "PhotoBrowseViewController.h"
import "MockPhotoSource.h"
import "Utils.h"

@implementation PhotoBrowseViewController

@synthesize data,parameter;

(id)initWithData:(NSString*)level { if (self = [super init]) {
parameter = [level componentsSeparatedByString:@"-"];
data=[[NSMutableArray alloc] initWithArray:[Utils getPhotosBrowse:[[parameter objectAtIndex:0] integerValue]  andArray:nil]];

} return self; }

(void)viewDidLoad { self.photoSource = [[[MockPhotoSource alloc] initWithType:MockPhotoSourceNormal //initWithType:MockPhotoSourceDelayed // initWithType:MockPhotoSourceLoadError //initWithType:MockPhotoSourceDelayed|MockPhotoSourceLoadError title:@"test" photos:[Utils getTestPhotos]

photos2:nil ] autorelease];


(void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; if(parameter!=nil ) [_scrollView setCenterPageIndex:[[parameter objectAtIndex:1] integerValue]];


(void)updateChrome { self.navigationItem.rightBarButtonItem = nil; }

(void) dealloc { [super dealloc]; }


And here the function:

+(NSArray *)getTestPhotos {
[NSArray arrayWithObjects:
 [[[MockPhoto alloc]
   size:CGSizeMake(0, 0)] autorelease],

 [[[MockPhoto alloc]
  size:CGSizeMake(0, 0)] autorelease],

 [[[MockPhoto alloc]
 size:CGSizeMake(0, 0)] autorelease],

 [[[MockPhoto alloc]
  size:CGSizeMake(0, 0)] autorelease],



I'm using iOS 5 and xcode 4.3. Three lib 1.0.11. I notice that this happen only with jpg large like 2Mb. I'm still investigating, but it seems weird to me.

Can anyone help me? It will be much appreciated any good advices.

thank you a lot


EDIT2: I figure out the problem is not much about the dimension of the file but the resolution of the image, acutally they are something like 5616 × 3744, which is ridiculous high for my purpose. I still have some crash in some big photos, any ideas how I can handle big pict?

thank you

share|improve this question
what is the console output? which is the line where it crashes? –  sergio Apr 8 '12 at 16:53

1 Answer 1

Read this


Basically rule of thumb is use png format wherever possible.

share|improve this answer

Your Answer


