Проблемы с памятью, навигацией и анимацией iOS 6?

В моем проекте у меня как 10 видов контроллеров: навигация-> 1-> 2-> 3-> 4-> 5-> 6-> 7-> 8-> 9-> 10; любой контроллер вида имеет собственную анимацию, с контроллером навигации я иду один на один контроллер вида с модальным перекрестным растворением, я тоже могу вернуться назад таким образом 10-> 9-> 8-> 7-> 6-> 5-> 4-> 3-> 2-> 1;, но когда я нахожусь в контроллере представления 8 или 9, приложение закрывается или вылетает, и я не знаю ПОЧЕМУ!!!, код, который я использую для любого вида контроллера это:

- (void)viewDidLoad
{
  NSLog(@"view did load");
  [super viewDidLoad];
  // Do any additional setup after loading the view.

  [self mostrarAnimacion];
}

- (void)didReceiveMemoryWarning
{
  [super didReceiveMemoryWarning];
  // Dispose of any resources that can be recreated.
  NSLog(@"Problemas de Memoria View Controller #(number of ViewController)");
}

- (void)getArrayEffectAnimacion
{
   NSMutableArray *arrayBall = [[NSMutableArray alloc] init];

   for (int i=0; i<9; i++) {
     UIImage *image = [UIImage imageWithData:
         [NSData dataWithContentsOfFile:[[NSBundle mainBundle] 
             pathForResource:
             [NSString stringWithFormat:@"imagen00%d.png", i] ofType:nil]]];
     [arrayBall addObject:image];
   }
   self.arrayEffectAnimacion = [NSArray arrayWithArray:arrayBall];
}


-(IBAction)Animacion
{

   [self getArrayEffectAnimacion];
   self.imgAnimacion.animationImages = self.arrayEffectAnimacion;
   self.imgAnimacion.animationDuration = 1.0f;

   [self.imgAnimacion setAnimationRepeatCount:1];
   [self.imgAnimacion startAnimating];

 }



- (void)viewWillDisappear:(BOOL)animated
{
   NSLog(@"View controller #(number of viewcontroller) desaparece");
   [super viewWillDisappear:animated];

   self.imgAnimacion.animationImages = nil;

}

 - (void) mostrarAnimacion
 {

    if (ES_IPAD())
    {

         [UIView animateWithDuration:15.0f delay:1 
             options:UIViewAnimationOptionRepeat animations:^{
              imagen.frame = 
                   CGRectMake(1024,imagen.frame.origin.y,  
                              imagen.frame.size.width, 
                              imagen.frame.size.height);
              } completion:nil];
    }
    else
    {
        if (ES_IPHONE_5)
        {

            [UIView animateWithDuration:25.0f delay:1 
                options:UIViewAnimationOptionRepeat animations:^{
                       imagen.frame = CGRectMake(568,imagen.frame.origin.y,
                            imagen.frame.size.width, imagen.frame.size.height);
            } completion:nil];
        }
        else
        {

            [UIView animateWithDuration:25.0f delay:1 
              options:UIViewAnimationOptionRepeat animations:^{
                ViewNubes.frame = CGRectMake(480,imagen.frame.origin.y, 
                     imagen.frame.size.width, imagen.frame.size.height);
            } completion:nil];
        }
    }

}

-(IBAction)TapUNO:(UITapGestureRecognizer *)recognizer
{
   dispatch_async(dispatch_get_main_queue(), ^{
       [self Animacion];
    });
}

Поэтому, когда я нахожусь в контроллере представления 8 или 9, приложение закрывается или закрывается и выводит мне nslog: только в последнем контроллере представления перед сбоем

2013-08-26 12:15:18.292 PRUEBA[214:907] Received memory warning.
2013-08-26 12:15:18.310 PRUEBA[214:907] Problemas de Memoria View Controller 01
2013-08-26 12:15:18.314 PRUEBA[214:907] Problemas de Memoria View Controller 02
2013-08-26 12:15:18.318 PRUEBA[214:907] Problemas de Memoria View Controller 01
2013-08-26 12:15:18.319 PRUEBA[214:907] Problemas de Memoria View Controller 02
2013-08-26 12:15:18.321 PRUEBA[214:907] Problemas de Memoria View Controller 03
2013-08-26 12:15:18.324 PRUEBA[214:907] Problemas de Memoria View Controller 04
2013-08-26 12:15:18.327 PRUEBA[214:907] Problemas de Memoria View Controller 05
2013-08-26 12:15:18.328 PRUEBA[214:907] Problemas de Memoria View Controller 06
2013-08-26 12:15:18.330 PRUEBA[214:907] Problemas de Memoria View Controller 07
2013-08-26 12:15:18.333 PRUEBA[214:907] Problemas de Memoria View Controller 08
2013-08-26 12:15:18.336 PRUEBA[214:907] Problemas de Memoria View Controller 09

Это похоже на то, что каждый контроллер представления будет работать все время, но только покажет мне фактический, так как я могу завершить или закрыть контроллер представления, чтобы перейти к следующему или другому, для модального перехода?? в перекрестном растворении?, я неправильно использую анимацию?, я вижу другие вопросы, но я не знаю, как это исправить!!! Как это исправить? Я использую xcode 4.5 для iOS 6

ОК, вдруг получи это мне сейчас или распечатай:

2013-08-26 18:41:56.717 PRUEBA[7488:907] view did load page 1
2013-08-26 18:42:17.848 PRUEBA[7488:907] view did load page 2
2013-08-26 18:42:18.219 PRUEBA[7488:907] page 1 desaparece
2013-08-26 18:42:33.903 PRUEBA[7488:907] view did load page 3
2013-08-26 18:42:34.283 PRUEBA[7488:907] page 2 desaparece
2013-08-26 18:42:48.345 PRUEBA[7488:907] view did load page 4
2013-08-26 18:42:48.707 PRUEBA[7488:907] page 3 desaparece
2013-08-26 18:43:02.223 PRUEBA[7488:907] view did load page 5
2013-08-26 18:43:02.565 PRUEBA[7488:907] page 4 desaparece
2013-08-26 18:43:15.596 PRUEBA[7488:907] view did load page 6
2013-08-26 18:43:15.896 PRUEBA[7488:907] page 5 desaparece
2013-08-26 18:43:22.393 PRUEBA[7488:907] view did load page 7
2013-08-26 18:43:22.791 PRUEBA[7488:907] page 6 desaparece
2013-08-26 18:43:27.868 PRUEBA[7488:907] view did load page 8
2013-08-26 18:43:28.250 PRUEBA[7488:907] page 7 desaparece
2013-08-26 18:43:33.504 PRUEBA[7488:907] view did load page 9
2013-08-26 18:43:33.797 PRUEBA[7488:907] page 8 desaparece
2013-08-26 18:43:43.015 PRUEBA[7488:907] view did load page 10
2013-08-26 18:43:43.505 PRUEBA[7488:907] page 9 desaparece
2013-08-26 18:46:23.233 PRUEBA[7488:907] Received memory warning.
2013-08-26 18:46:23.635 PRUEBA[7488:907] Problemas de Memoria View Controller 01
2013-08-26 18:46:23.755 PRUEBA[7488:907] Problemas de Memoria View Controller 02
2013-08-26 18:46:23.786 PRUEBA[7488:907] Problemas de Memoria View Controller 03
2013-08-26 18:46:23.828 PRUEBA[7488:907] Problemas de Memoria View Controller 04
2013-08-26 18:46:23.841 PRUEBA[7488:907] Problemas de Memoria View Controller 05
2013-08-26 18:46:23.862 PRUEBA[7488:907] Problemas de Memoria View Controller 06
2013-08-26 18:46:23.875 PRUEBA[7488:907] Problemas de Memoria View Controller 07
2013-08-26 18:46:23.889 PRUEBA[7488:907] Problemas de Memoria View Controller 08
2013-08-26 18:46:23.908 PRUEBA[7488:907] Problemas de Memoria View Controller 09
2013-08-26 18:46:23.946 PRUEBA[7488:907] Problemas de Memoria View Controller 10
2013-08-26 18:46:23.990 PRUEBA[7488:907] Problemas de Memoria View Controller 09
2013-08-26 18:46:24.040 PRUEBA[7488:907] Problemas de Memoria View Controller 08
2013-08-26 18:46:24.054 PRUEBA[7488:907] Problemas de Memoria View Controller 07
2013-08-26 18:46:32.077 PRUEBA[7488:907] view did load page 1
2013-08-26 18:46:32.704 PRUEBA[7488:907] view did load page 2
2013-08-26 18:46:33.090 PRUEBA[7488:907] view did load page 3
2013-08-26 18:46:33.521 PRUEBA[7488:907] view did load page 4
2013-08-26 18:46:33.946 PRUEBA[7488:907] view did load page 5
2013-08-26 18:46:34.354 PRUEBA[7488:907] view did load page 6
2013-08-26 18:46:34.821 PRUEBA[7488:907] view did load page 7
2013-08-26 18:46:35.368 PRUEBA[7488:907] view did load page 8
2013-08-26 18:46:35.857 PRUEBA[7488:907] view did load page 9

почему из всех viewcontroller метод viewDidLoad запускается в одно и то же время из каждого viewcontroller??? проблема с памятью? Навигация?? помогите пожалуйста ребята

0 ответов

Другие вопросы по тегам