0

Any reason this App Store link isnt working properly (nothing happens when you press it)

- (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"]];
        }
    }
benhowdle89
  • 36,900
  • 69
  • 202
  • 331

1 Answers1

3

Try changing...

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

to...

- (void) alertView:(UIAlertView *) alertView clickedButtonAtIndex:(NSInteger) index
Rits
  • 5,105
  • 4
  • 42
  • 53