Skip to content

Instantly share code, notes, and snippets.

View rivera-ernesto's full-sized avatar
👨‍💻

Ernesto Rivera rivera-ernesto

👨‍💻
View GitHub Profile
@rivera-ernesto
rivera-ernesto / SafeNavigationController.h
Created August 15, 2014 03:20
SafeNavigationController which instead of ignoring subsequent push calls handles a "push queue"
//
// SafeNavigationController.h
// SafeNavigationController.h
//
// Created by 利辺羅 on 2014/08/14.
// Copyright (c) 2014年 CyberAgent Inc. All rights reserved.
//
#import <UIKit/UIKit.h>
@nonamelive
nonamelive / DMNavigationController.m
Last active April 21, 2023 06:56
Prevent UINavigationController from pushing two view controllers at the same time in case of stack inconsistency and crashes
@interface UINavigationController (DMNavigationController)
- (void)didShowViewController:(UIViewController *)viewController animated:(BOOL)animated;
@end
@interface DMNavigationController ()
@property (nonatomic, assign) BOOL shouldIgnorePushingViewControllers;