Hey,
ich hab bei meiner App irgendein Speicherproblem und ich vermute das liegt an meinem CollectionView bzw. deren Inhalt.
Thead dazu :Deallocated ViewController
Hier meine aktuelle Methode
Alles anzeigen
Wenn ich den CollectionView durchswipe sieht mein Allocation Template bei Instruments wie folgt aus(siehe Anhänge)
Hat einer eine Ahnung woran das liegen könnte?
ich hab bei meiner App irgendein Speicherproblem und ich vermute das liegt an meinem CollectionView bzw. deren Inhalt.
Thead dazu :Deallocated ViewController
Hier meine aktuelle Methode
Quellcode
- -(UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
- //CELL IDENTIFIER
- static NSString *identifier = @"DetailCollectionCell";
- //CREATE DetailCollectionCell
- DetailCollectionCell *cell = (DetailCollectionCell *)[collectionView dequeueReusableCellWithReuseIdentifier:identifier forIndexPath:indexPath];
- //SET RECIPE TO CURRENT RECIPE PROPERTY
- _currentRecipe = currentRecipe;
- //CREATE DetailContentViewController WITH IDENTIFIER
- DetailContentViewController *theDetailContentViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"DetailContentViewController"];
- //ADD DetailContentViewController TO CELL
- [cell setDetailContentViewController:theDetailContentViewController];
- //SET DetailContentViewController ATTRIBUTES
- [theDetailContentViewController.view setFrame:CGRectMake(0,0, cell.frame.size.width, cell.frame.size.height)];
- [theDetailContentViewController.theScrollView setFrame:CGRectMake(0,0, cell.frame.size.width, cell.frame.size.height)];
- [theDetailContentViewController fillScrollView];
- NSString *imageName = currentRecipe.titlePictureFilename;
- //SET IMAGE WITH CACHING
- UIImage *image = [[SDImageCache sharedImageCache] imageFromDiskCacheForKey:imageName];
- if (image) {
- [theDetailContentViewController.titleImage setImage:image];
- }else{
- [theDetailContentViewController.titleImage setImageWithURL:[KSAppDelegate getURLFromFilename:imageName]];
- }
- //ADD DetailContentViewControllers VIEW TO CELL
- [cell addSubview:theDetailContentViewController.view];
- //RETURN CELL
- return cell;
- }
Wenn ich den CollectionView durchswipe sieht mein Allocation Template bei Instruments wie folgt aus(siehe Anhänge)
Hat einer eine Ahnung woran das liegen könnte?