Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Flexoid

macrumors newbie
Original poster
Jan 24, 2013
2
0
How create app like this:
12.png

Left of the line image black and white, right - color. Line is animated. How to do it?
 

ArtOfWarfare

macrumors G3
Nov 26, 2007
9,560
6,059
I would have two seperate UIImageViews, one with the black and white version and one with color (and maybe a third with the red line.)

To generate the black and white version, I think you should look at CGFilters (I believe that's what they're called... I've experimented with them before but never used them in an actual app.)

Edit: oh, and I'd shift the bounds/frame around on whichever image is ontop when the slider is moving.
 

Flexoid

macrumors newbie
Original poster
Jan 24, 2013
2
0
I would have two seperate UIImageViews, one with the black and white version and one with color (and maybe a third with the red line.)

To generate the black and white version, I think you should look at CGFilters (I believe that's what they're called... I've experimented with them before but never used them in an actual app.)

Edit: oh, and I'd shift the bounds/frame around on whichever image is ontop when the slider is moving.

Can show the approximate code?
 

ArtOfWarfare

macrumors G3
Nov 26, 2007
9,560
6,059
Can show the approximate code?

No, I think you should research the things I mentioned and give it a shot yourself first. I (and everyone else on the forums) will be available for help if you're not able to figure some of it out yourself, but we're not going to do all of it for you.
 

KoolStar

macrumors demi-god
Oct 16, 2006
825
9
Kentucky
No, I think you should research the things I mentioned and give it a shot yourself first. I (and everyone else on the forums) will be available for help if you're not able to figure some of it out yourself, but we're not going to do all of it for you.

I second this, you dont learn anything without trying yourself.

As a bit of a tip.

Top View = Redbar that you can touch (touchesBegin/touchesEnd methods).
Next View Down = Color Image
Next View Down = BW Image (CIFilters).

This would be the easiest approach with out doing partial image filters. is to use two image that you change the bounds just like @ArtOfWarfare suggested.

Any questions we would be happy to answer but not writing all the code for you.

As another suggestion you may check out http://cocoacontrols.com. They may have something similar to what you want.

----------

Also if you would like to go with the approach of using a single image and filters you will need to use CIFilter Maps.

https://developer.apple.com/mac/library/documentation/GraphicsImaging/Reference/CoreImageFilterReference/Reference/reference.html

-----------

Here is a sample control after a little google time. http://www.cocoacontrols.com/platforms/ios/controls/wcbeforeafter
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.