I am developing an image gallery that allows me to select some images from the iPhone and display them.
Some explanations about this gallery:
UITableView Displays various directories containing iPhone pictures- When the user clicks on one of these directories: Display
UICollectionViewwith different images from the selected directory - Back button to return to
UITableView - The next button to display the selected images on a new page.
How this gallery is implemented:
- For each directory found on iPhone images, save
ALAssetsGroupin NSMutableArraynamed directoriesData li> - Display directories stored in Data directories, in
UITableView. - When the user selects one directory: store each of the
ALAssetcontained in this directory in NSMutableArraythe name picturesData. - Display thumbnails in
UICollectionViewfrom images. - When the user selects an image, it is saved in a single instance
NSMutableArraynamed wishPictures. - If the user clicks the back button, I delete all objects from the Data images before displaying
UITableView.
Now the problem is:
I have two different image catalogs on my iPhone.
Directory A Directory B
I want to select one image in Catalog A and another in Catalog B.
After selecting them, I click on the next page to display them.
.
, ALAsset A, EXC_BAD_ACCESS.
, pictureData ( ), EXC_BAD_ACCESS.
pictureData, , UICollectionView . A, B, UICollectionView.
, ALAsset PictureData?
, .
!

Edit:
Backtrace
* thread # 29: tid = 0x599a6, 0x39764b26 libobjc.A.dylib objc_msgSend + 6, queue = 'com.apple.root.high-priority, stop reason = EXC_BAD_ACCESS (code=1, address=0xc)
frame #0: 0x39764b26 libobjc.A.dylib objc_msgSend + 6
frame # 1: 0x00195f1a MyProject -[Picture getFullImage](self=0x176ebb40, _cmd=0x005de393) + 310 at Picture.m:211
frame #2: 0x001959bc MyProject - [ getCroppedImage] (self = 0x176ebb40, _cmd = 0x005da2b4) + 68 Picture.m: 154
# 3: 0x001f9a82 MyProject __68-[ImageCropViewController sliderContentsAddContent:ToSlider:AtPage:]_block_invoke(.block_descriptor=0x17637000) + 50 at ImageCropViewController.m:1020
frame #4: 0x39c4cd1a libdispatch.dylib _dispatch_call_block_and_release + 10
# 5: 0x39c53d70 libdispatch.dylib _dispatch_root_queue_drain + 220
frame #6: 0x39c53f58 libdispatch.dylib _dispatch_worker_thread2 + 56
frame # 7: 0x39d8edbe libsystem_pthread.dylib`_pthread_wqthread + 298