How we can achive this?

Discussion in 'iOS Programming' started by Pulkit, Sep 12, 2008.

  1. Pulkit macrumors newbie

    Joined:
    Aug 27, 2008
    #1
    HI Guys,

    Any ideas how we can put a cross image on a button as shown in this picture?

    [Image is attached with this thread!]

    Any minor help will do for me.

    Thanks and Regards
    Pulkit
     

    Attached Files:

  2. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #2
    You do this kind of badging using core graphics. Basically you create a bitmapcontext, draw your image into the context, draw your badge onto the context, and get a UIImage back from the context.
     
  3. Pulkit thread starter macrumors newbie

    Joined:
    Aug 27, 2008
    #3
    Can't be it done using the imageinset and outset methods of UIButton?

    Regards
    Pulkit
     
  4. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #4
    Or just put that image into another button and add that button as a subview of the main button.
     
  5. Pulkit thread starter macrumors newbie

    Joined:
    Aug 27, 2008
    #5
    Buddy I tried this button it didn't work according to my needs. But anyway, I have achieved this using imageEdgeInset method and its working fine.

    Can anybody now how can I implement drag and drop on UIButton? Meaning I want to show my button actually moving during the drag and drop operation.

    Thanks,
    Pulkit
     

Share This Page