views:

108

answers:

0

I have a View that must open a subview if you click "Open Store" in a AlertView, but the subview is open, and after 1 sec closed again. Where is the problem??

This is my code:

  //my alertview
  UIAlertView *alert = [[UIAlertView alloc] 
        initWithTitle:@"Error" 
        message:@"You must buy this item to use it!" 
       delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Go Store",nil];




  [alert show];
  [alert release];
 }



}


- (void)alertView:(UIAlertView *)alert

clickedButtonAtIndex:(NSInteger)buttonIndex {
 if (buttonIndex == 1) {

  [[Airship shared] displayStoreFront];  //my subview

 } else {


 }

}