Work with uiimage

Discussion in 'iOS Programming' started by Flexoid, Jan 24, 2013.

  1. macrumors newbie

    Joined:
    Jan 24, 2013
    #1
    How create app like this:[​IMG]
    Left of the line image black and white, right - color. Line is animated. How to do it?
     
  2. macrumors 604

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #2
    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.
     
  3. thread starter macrumors newbie

    Joined:
    Jan 24, 2013
    #3
    Can show the approximate code?
     
  4. macrumors 604

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #4
    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.
     
  5. KoolStar, Jan 24, 2013
    Last edited: Jan 25, 2013

    macrumors demi-god

    KoolStar

    Joined:
    Oct 16, 2006
    Location:
    Kentucky
    #5
    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
     

Share This Page