我使用這個偉大的STPopup: http://cocoadocs.org/docsets/STPopup/1.2.0/Classes/STPopupController.htmlSTPopupController的解除/關閉回調方法?
- (void)showPopupWithTransitionStyle:(STPopupTransitionStyle)transitionStyle rootViewController:(UIViewController *)rootViewController
{
STPopupController *popupController = [[STPopupController alloc] initWithRootViewController:rootViewController];
popupController.cornerRadius = 4;
popupController.transitionStyle = transitionStyle;
[popupController presentInViewController:self];
//[popupController dismissWithCompletion:^{NSLog(@"Dismissed!");}];
}
- (IBAction)btnClick:(id)sender {
[self showPopupWithTransitionStyle:STPopupTransitionStyleSlideVertical rootViewController:[ad new]];
}
這是工作的罰款,到目前爲止,但我想,當彈出窗口關閉的執行代碼。我怎樣才能做到這一點?
Thx!
當彈出完成雨後春筍般冒出來,這是隻執行該'completion'代碼。並且*不在通過點擊交叉按鈕關閉時。 – user3550458