Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
za
- (void)closeX{
NSLog(@"CLOSE PRESSED");
if (modalVC) {
[closeEventRegion removeFromSuperview];
closeEventRegion = nil;
[currentWebView removeFromSuperview];
if ([modalVC respondsToSelector:@selector(dismissViewControllerAnimated:completion:)]) {
[modalVC dismissViewControllerAnimated:NO completion:nil];
}
}
modalVC = nil;
if (webViewPart2) {
webViewPart2.delegate = nil;
currentWebView = webView;
webViewPart2 = nil;
} else {
webView.frame = CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.height);
}
[self addSubview:webView];
if ([self.delegate respondsToSelector:@selector(AMViewDidClose:)]) {
[self.delegate AMViewDidClose:self];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment