2017-08-17 18:37:21 +02:00
|
|
|
//
|
|
|
|
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#import <UIKit/UIKit.h>
|
|
|
|
|
2017-08-18 15:58:16 +02:00
|
|
|
// Any view controller which wants to be able cancel back button
|
|
|
|
// presses and back gestures should implement this protocol.
|
2017-08-17 18:37:21 +02:00
|
|
|
@protocol OWSNavigationView <NSObject>
|
|
|
|
|
2017-08-18 16:02:45 +02:00
|
|
|
// shouldCancelNavigationBack will be called if the back button was pressed or
|
|
|
|
// if a back gesture was performed but not if the view is popped programmatically.
|
2017-08-18 15:58:16 +02:00
|
|
|
- (BOOL)shouldCancelNavigationBack;
|
2017-08-17 18:37:21 +02:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
#pragma mark -
|
|
|
|
|
|
|
|
// This navigation controller subclass should be used anywhere we might
|
|
|
|
// want to cancel back button presses or back gestures due to, for example,
|
|
|
|
// unsaved changes.
|
|
|
|
@interface OWSNavigationController : UINavigationController
|
|
|
|
|
|
|
|
@end
|