From 377b44220f2a4a8b7ffc3eda9e93cf073e8a74da Mon Sep 17 00:00:00 2001 From: Tomáš Znamenáček Date: Tue, 5 Aug 2014 11:13:13 +0200 Subject: Repackaged the code as a framework and included the demo. Packaging the code as a framework is mostly just a formality. It doesn’t really change much, it just turns the code into a regular component. What it does change is that the code now has its own Xcode settings, which could make compatibility easier in the long run. Including the demo in the main repository makes it easier to hack on the library, since you can try the changes immediately. It also shows how to bundle the framework into an app that uses it. --- Framework/MASShortcutView.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Framework/MASShortcutView.h (limited to 'Framework/MASShortcutView.h') diff --git a/Framework/MASShortcutView.h b/Framework/MASShortcutView.h new file mode 100644 index 0000000..c8a46bb --- /dev/null +++ b/Framework/MASShortcutView.h @@ -0,0 +1,23 @@ +#import + +@class MASShortcut; + +typedef enum { + MASShortcutViewAppearanceDefault = 0, // Height = 19 px + MASShortcutViewAppearanceTexturedRect, // Height = 25 px + MASShortcutViewAppearanceRounded, // Height = 43 px + MASShortcutViewAppearanceFlat +} MASShortcutViewAppearance; + +@interface MASShortcutView : NSView + +@property (nonatomic, strong) MASShortcut *shortcutValue; +@property (nonatomic, getter = isRecording) BOOL recording; +@property (nonatomic, getter = isEnabled) BOOL enabled; +@property (nonatomic, copy) void (^shortcutValueChange)(MASShortcutView *sender); +@property (nonatomic) MASShortcutViewAppearance appearance; + +/// Returns custom class for drawing control. ++ (Class)shortcutCellClass; + +@end -- cgit v1.2.3