Skip to content

Instantly share code, notes, and snippets.

@steipete
Created November 26, 2014 11:09
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save steipete/aa6912d5314fd91258a9 to your computer and use it in GitHub Desktop.
Save steipete/aa6912d5314fd91258a9 to your computer and use it in GitHub Desktop.
- [UIPopoverPresentationController dimmingViewWasTapped:] decompiled with Hopper 3.6.4
void -[UIPopoverPresentationController dimmingViewWasTapped:](void * self, void * _cmd, void * arg2) {
esi = self;
edi = @selector(delegate);
if ([esi delegate] != 0x0) {
eax = [esi delegate];
var_10 = @selector(popoverPresentationControllerShouldDismissPopover:);
eax = [eax respondsToSelector:@selector(popoverPresentationControllerShouldDismissPopover:)];
if (LOBYTE(eax) != 0x0) {
eax = [esi presented];
if (LOBYTE(eax) != 0x0) {
eax = [esi dismissing];
if (LOBYTE(eax) == 0x0) {
eax = [esi delegate];
eax = [eax popoverPresentationControllerShouldDismissPopover:esi];
if (LOBYTE(eax) != 0x0) {
esi->_isDismissingBecauseDimmingViewTapped = 0x1;
eax = [esi presentingViewController];
[eax dismissViewControllerAnimated:0x1 completion:0x0];
eax = [esi delegate];
if (eax != 0x0) {
eax = [esi delegate];
ebx = @selector(popoverPresentationControllerWillDismissPopover:);
eax = [eax respondsToSelector:ebx];
if (LOBYTE(eax) != 0x0) {
eax = [esi delegate];
eax = [eax popoverPresentationControllerWillDismissPopover:esi];
}
}
}
}
}
}
else {
esi->_isDismissingBecauseDimmingViewTapped = 0x1;
eax = [esi presentingViewController];
[eax dismissViewControllerAnimated:0x1 completion:0x0];
eax = [esi delegate];
if (eax != 0x0) {
eax = [esi delegate];
ebx = @selector(popoverPresentationControllerWillDismissPopover:);
eax = [eax respondsToSelector:ebx];
if (LOBYTE(eax) != 0x0) {
eax = [esi delegate];
eax = [eax popoverPresentationControllerWillDismissPopover:esi];
}
}
}
}
else {
esi->_isDismissingBecauseDimmingViewTapped = 0x1;
eax = [esi presentingViewController];
[eax dismissViewControllerAnimated:0x1 completion:0x0];
eax = [esi delegate];
if (eax != 0x0) {
eax = [esi delegate];
ebx = @selector(popoverPresentationControllerWillDismissPopover:);
eax = [eax respondsToSelector:ebx];
if (LOBYTE(eax) != 0x0) {
eax = [esi delegate];
eax = [eax popoverPresentationControllerWillDismissPopover:esi];
}
}
}
return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment