forked from aydenp/Ultrasound
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathABVolumeHUDVisibilityManager.h
32 lines (27 loc) · 1.05 KB
/
ABVolumeHUDVisibilityManager.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
//
// ABVolumeHUDVisibilityManager.h
// Ultrasound
//
// Created by Ayden Panhuyzen on 8/27/18.
// Copyright © 2018 Ayden Panhuyzen. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@protocol ABVolumeHUDVisibilityManagerDelegate <NSObject>
- (void)shouldChangeVolumeHUDVisibleTo:(BOOL)visible;
@end
@interface ABVolumeHUDVisibilityManager : NSObject
/// A delegate to conform to that will notify of the desired state.
@property (nonatomic, weak) NSObject <ABVolumeHUDVisibilityManagerDelegate>*delegate;
/// The volume HUD should be shown (or the timer restarted).
- (void)showVolumeHUD;
/// The volume HUD's hide timer should be restarted if it is already showing.
- (void)restartIdleTimer;
/// Immediately hide the HUD, if possible.
- (void)hideImmediatelyIfPossible;
/// Request that the display be held for a reason, such as active touches.
- (void)prolongDisplayForReason:(NSString *)reason;
/// Remove a prior request to hold display.
- (void)releaseProlongedDisplayForReason:(NSString *)reason;
@end
NS_ASSUME_NONNULL_END