forked from DrummerB/BFColorPickerPopover
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Readme
35 lines (22 loc) · 1.5 KB
/
Readme
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
33
34
35
Summary
-------
BFColorPickerPopover is a subclass of NSPopover that includes the standard OS X color picker user interface. This helps reducing the inspector window and panel clutter on the screen, as the popover sticks to the content it belongs to. However it's still possible to transform it into an inspector style floating panel by simple dragging it off from the color well.
Requirements
------------
BFColorPickerPopover was written using ARC and Modern Objective-C.
ARC (with weak references) is supported since OS X 10.7.
For Modern Objective-C you'll need Xcode 4.4 or later and LLVM.
Instructions
------------
Drag the folder BFColorPickerPopover into your your project in Xcode.
Choose "Create groups for any added folders and make sure your target is checked.
BFColorPickerPopover is a singleton class. Use [BFColorPickerPopover sharedPopover] to access it. The reason for this is, that it uses NSColorPanel to create it's GUI and there is only one shared NSColorPanel available per app.
You can use the usual showRelativeToRect:ofView:preferredEdge: method of NSPopover to show the shared BFColorPickerPopover instance. But there is also a subclass of NSColorWell included (BFPopoverColorWell) that already handles presenting the popover when needed.
Check out the example application for both approaches.
License
-------
New BSD License. For the full license text, see the included LICENSE file.
Credits
-------
BFColorPickerPopover was created by Balázs Faludi.
You can e-mail me at [email protected]