mattgemmell/MGTileMenu

Dismiss without animation

Opened this issue · 0 comments

small item, but important I think. If you dismiss on applicationDidEnterForeground, the tile menu is visible in the snapshot shown when you return to the application. It shows just briefly then disappears, not nice. I presume the animation delays the dismissal such that it still exists when the image is taken.
I copied and pasted your lines:


// Remove from spawning view.
[self.view removeFromSuperview];
UIAccessibilityPostNotification(UIAccessibilityLayoutChangedNotification, nil);

// Inform delegate.
if (_appeared && _delegate && [_delegate respondsToSelector:@selector(tileMenuDidDismiss:)]) {
    [_delegate tileMenuDidDismiss:self];
}

// Send notification.
[[NSNotificationCenter defaultCenter] postNotificationName:MGTileMenuDidDismissNotification 
                                                    object:self 
                                                  userInfo:nil];

_appeared = NO;

Into a new procedure for dismissWithoutAnimation and confirmed my theory. The tile menu is no longer present in the snapshot on return. I may be missing some other important processes in the dismissal sequence, this was just to see if my assumption was correct.