aboutsummaryrefslogtreecommitdiffstats
path: root/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'Framework')
-rw-r--r--Framework/MASShortcutBinder.h2
-rw-r--r--Framework/MASShortcutBinder.m10
2 files changed, 12 insertions, 0 deletions
diff --git a/Framework/MASShortcutBinder.h b/Framework/MASShortcutBinder.h
index c38dbd4..98e01c7 100644
--- a/Framework/MASShortcutBinder.h
+++ b/Framework/MASShortcutBinder.h
@@ -2,6 +2,8 @@
@interface MASShortcutBinder : NSObject
++ (instancetype) sharedBinder;
+
@property(strong) MASShortcutMonitor *shortcutMonitor;
@property(copy) NSDictionary *bindingOptions;
diff --git a/Framework/MASShortcutBinder.m b/Framework/MASShortcutBinder.m
index 1039f64..bf85c41 100644
--- a/Framework/MASShortcutBinder.m
+++ b/Framework/MASShortcutBinder.m
@@ -27,6 +27,16 @@
}
}
++ (instancetype) sharedBinder
+{
+ static dispatch_once_t once;
+ static MASShortcutBinder *sharedInstance;
+ dispatch_once(&once, ^{
+ sharedInstance = [[self alloc] init];
+ });
+ return sharedInstance;
+}
+
#pragma mark Registration
- (void) bindShortcutWithDefaultsKey: (NSString*) defaultsKeyName toAction: (dispatch_block_t) action