Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image picker support #31

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Image picker support #31

wants to merge 8 commits into from

Conversation

RSully
Copy link
Owner

@RSully RSully commented Aug 24, 2013

This branch is a testing ground for adding custom-image support as suggested in #29.

_rep = [[ANImageBitmapRep alloc] initWithSize:newSize];
} else if (_customImage) {
_rep = [[ANImageBitmapRep alloc] initWithImage:_customImage];
[_rep setSizeFillingFrame:newSize];
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be in the background

Conflicts:
	RSColorPicker/ColorPickerClasses/RSColorPickerView.h
	RSColorPicker/ColorPickerClasses/RSColorPickerView.m
	RSColorPicker/TestColorViewController.m
@RSully
Copy link
Owner Author

RSully commented Jan 18, 2014

This is pretty broken right now given the "state" concept we implemented.

@dsmurfin
Copy link

I can see why the new state stuff has broken this now I've had a look through the code. I reckon this would be quite a useful addition if it can be made to work with the new code.

@RSully
Copy link
Owner Author

RSully commented Jan 20, 2014

Yeah I haven't lost hope for this yet.

A few solutions come to mind:

  • New state stuff just has to go
  • Heavy refactoring with if/else for state vs image.
  • State could be refactored into different state types:
    • HSV state
    • Live state (used for custom images, and useful for debugging)

/ping @unixpickle

@dsmurfin
Copy link

I guess the cleanest option is potentially no.3. That keeps the logic in the same class etc and should result in less changes to RSColorPickerView

@unixpickle
Copy link
Contributor

If we made a state base class and then subclassed it for HSV and Live states that would possibly work. I'll look into it when I'm free.

@RSully
Copy link
Owner Author

RSully commented Jan 21, 2014

Even an interface/protocol might do the job. Edit: abstract/base class is probably better, as suggested.

@RSully RSully mentioned this pull request Dec 31, 2014
@RSully RSully mentioned this pull request Jan 20, 2015
@RSully RSully mentioned this pull request Jul 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants