• Stars
    star
    118
  • Rank 299,923 (Top 6 %)
  • Language
    Objective-C
  • License
    MIT License
  • Created about 12 years ago
  • Updated over 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A color picker for iOS

iOS Color Picker

Version License Platform

A reusable color picker component for iOS. Works for iPhone, iPad, in modal sheets, popovers... just about anywhere.

Using iOS-Color-Picker

Installation

The easiest way to use iOS-Color-Picker is with CocoaPods. Add the following line to your Podfile.

pod 'iOS-Color-Picker'

Otherwise, you need to include the following files in your project:

  • FCColorPickerViewController.h
  • FCColorPickerViewController.m
  • FCColorPickerViewController.xib
  • Resources/colormap.png

Using a Color Picker from a View Controller

Suppose you have a view controller with a color property you'd like to let the user pick. Make your view controller implement the FCColorPickerViewControllerDelegate protocol. Handle the color picked and the cancelled methods, and make a method that triggers showing the view controller.

-(IBAction)chooseColor:(id)sender {
    FCColorPickerViewController *colorPicker = [FCColorPickerViewController colorPicker];
    colorPicker.color = self.color;
    colorPicker.delegate = self;
    
    [colorPicker setModalPresentationStyle:UIModalPresentationFormSheet];
    [self presentViewController:colorPicker animated:YES completion:nil];
}

#pragma mark - FCColorPickerViewControllerDelegate Methods

-(void)colorPickerViewController:(FCColorPickerViewController *)colorPicker didSelectColor:(UIColor *)color {
    self.color = color;
    [self dismissViewControllerAnimated:YES completion:nil];
}

-(void)colorPickerViewControllerDidCancel:(FCColorPickerViewController *)colorPicker {
    [self dismissViewControllerAnimated:YES completion:nil];
}

The color picker has tintColor and backgroundColor properties for configuring its appearance.

Screenshots

iPhone

iPhone 5

iPhone 5

iPad

iPhone 5

iPhone 5

Example Project

An example project is included in /Example. Run pod install in the example directory to configure the project, then open the Xcode workspace.

More Repositories

1

node-native-boilerplate

A very small, understandable node native extension with approachable project structure
C++
168
star
2

mirror-displays

A Mac app and command-line tool for fiddling with display mirroring: on/off/toggle
Objective-C
148
star
3

Bayes

Naive Bayes Classifier in Swift for Mac and iOS
Swift
30
star
4

OHMKit

Declarative mapping between JSON and Objective-C classes
Objective-C
20
star
5

SwiftImage

CoreImage helpers in Swift
Swift
15
star
6

bake

A static site generator that's just Pandoc and Make
HTML
12
star
7

TokenField

SwiftUI wrapper for NSTokenField
Swift
11
star
8

SafeCast

Safe casting for Objective-C
Objective-C
11
star
9

HLSCore

A collection of Swift packages for working with HLS
Swift
10
star
10

LiveStreamParser

A Parser for HTTP Live Streaming in Objective-C
Objective-C
8
star
11

ogol

Swift
7
star
12

Scope

Swift
6
star
13

React-Native-Pedometer-App

An iOS pedometer in React Native
Objective-C
6
star
14

gba-print

printf for the GameBoy Advance
Objective-C
4
star
15

pebble-template

template for your pebbling
C
3
star
16

ios-color-picker-example

A color picker for iOS
Objective-C
3
star
17

yelp-ios-api-v2

An easy to use iOS client for Yelp Search v2
Objective-C
3
star
18

scrape

Download HLS Streams
Swift
3
star
19

HabitForming

A habit-tracking app for iOS
Objective-C
3
star
20

BindBackstop

(Binding<T?>, T) -> Binding<T>
Swift
3
star
21

Sanstring

NSRegularExpression playground
Swift
3
star
22

DropPin

A global geospatial pin-board for iOS with a Parse back-end
Objective-C
2
star
23

React-Native-Pedometer

A CoreMotion Pedometer Native Module for React Native
Objective-C
2
star
24

FFCTextField

iOS Text field with a floating name label and validations
Swift
2
star
25

JPGlitch

ok. let's explore jpegs 🔭
Swift
2
star
26

PebbleTunnel

Infinite Tunnel for Pebble
C
2
star
27

Compass

Sometimes a map just isn't enough
Swift
2
star
28

FFCPieChart

iOS Pie Charts
Objective-C
1
star
29

docket

Shows a timeline overlay to keep you on schedule
Swift
1
star
30

Uncontrollable

MV-nothing
Objective-C
1
star
31

elevate

JavaScript
1
star
32

code-snippets

Xcode snippets. Blocks, GCD, Core Data. I don't need to remember that stuff.
Objective-C
1
star
33

fcanas.github.io

HTML
1
star
34

manifest-cycle-bug

Swift
1
star
35

downdown

💀💀💀 naïve, broken markdown parsing with regular expressions and swift 💀💀💀
Swift
1
star
36

streamer

HLS Notes and Resources
HTML
1
star
37

FFCTemplate

A model-based template in Objective-C
Objective-C
1
star
38

petulant-octo-shame

an 🐘 never forgets his bash scripts
Shell
1
star
39

Trim

Objective-C
1
star
40

js-cocoa

A Cocoa App written in JavaScript
JavaScript
1
star
41

dit

Basic CLI for Reminders on macOS
Swift
1
star
42

single-media-player

An iOS app that plays a single piece of media
Swift
1
star
43

FFCStorage

Auth and Network handling so you can store models in a RESTful API
Objective-C
1
star