bfc

BFColorPickerPopover

The standard OS X color picker put into an NSPopover

Showing:

Popularity

Downloads/wk

0

GitHub Stars

103

Maintenance

Last Commit

7yrs ago

Contributors

4

Package

Dependencies

0

License

BSD

Categories

Readme

BFColorPickerPopover

Pod Version Pod Platform Pod License Dependency Status

Screenshot

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 simply 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. I also had to use a few undocumented methods, so I can't guarantee that Apple won't reject an app with this code. They aren't that strict with OS X apps though.

Instructions

Create a Podfile, if you don't have one already. Add the following line.

pod 'BFColorPickerPopover'

Run the following command.

pod install

Alternatively, you can just drag the BFColorPickerPopover folder 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 its 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 here.

Credits

BFColorPickerPopover was created by Balázs Faludi.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100