2010-12-12 8 views
0

Quel est le motif ce lien App Store isnt fonctionne correctement (rien ne se passe lorsque vous appuyez dessus)lien App Store ne pas ouvrir dans UIAlertView

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 
     id <NSFetchedResultsSectionInfo> sectionInfo = [[self.fetchedResultsController sections] objectAtIndex:section]; 
     rowsNumber = [NSNumber numberWithUnsignedInteger:sectionInfo.numberOfObjects]; 
     if ([rowsNumber intValue] > 1) { 
      textField.hidden = YES; 

      UIAlertView *alert = [[UIAlertView alloc] initWithTitle:nil message:@"An Alert!" 
                  delegate:self 
                cancelButtonTitle:@"OK" 
                otherButtonTitles:@"Buy Full Version", nil]; 
      [alert show]; 
      [alert release]; 

     } 
     NSLog(@"%d", [rowsNumber intValue]); 
     return [sectionInfo numberOfObjects]; 
    } 

    - (void) alertView:(UIAlertView *) alertView buttonClickedAtIndex:(NSInteger) index { 
     if(index == 1) { 
      [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://phobos.apple.com/gb/app/stalk-it/id405797470?mt=8"]]; 
     } 
    } 

Répondre

3

Essayez de changer ...

- (void) alertView:(UIAlertView *) alertView buttonClickedAtIndex:(NSInteger) index 

à ...

- (void) alertView:(UIAlertView *) alertView clickedButtonAtIndex:(NSInteger) index