2016-02-15 3 views
0

Я делегат установить в себя и добавилКак сохранить LGAlertView, показанный после нажатия кнопки?

также вот мой код:

LGAlertView *alertView = [[LGAlertView alloc]initWithViewAndTitle:@"title" message:nil style:LGAlertViewStyleActionSheet view:view buttonTitles:@[@"Button 1"] cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil 
      actionHandler:^(LGAlertView *alertView, NSString *title, NSUInteger index) 
     { 
     NSLog(@"actionHandler, %@, %lu", title, (long unsigned)index); 
     } 
     cancelHandler:^(LGAlertView *alertView) { 
     NSLog(@"cancelHandler"); 
     } 
     destructiveHandler:^(LGAlertView *alertView) { 
     NSLog(@"destructiveHandler"); 
     }]; 

     [buyView setCancelOnTouch:NO]; 

     [buyView setDelegate:self]; 

     NSLog(@"%d",buyView.cancelOnTouch); 
     [buyView showAnimated:YES completionHandler:nil]; 

Когда я делаю нажмите на кнопку все еще увольняет вид

также когда представление уволен это отображается на бревнах -[LGAlertView dealloc] [Line 972]

ответ

0

Ответ должен установить alert.dismissOnAction = NO;

Смежные вопросы