iOS How we can achive this?

Pulkit

macrumors newbie
Original poster
Aug 27, 2008
25
0
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
 

Attachments


PhoneyDeveloper

macrumors 68040
Sep 2, 2008
3,114
93
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.
 

Pulkit

macrumors newbie
Original poster
Aug 27, 2008
25
0
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.
Can't be it done using the imageinset and outset methods of UIButton?

Regards
Pulkit
 

kainjow

Moderator emeritus
Jun 15, 2000
7,745
3
Or just put that image into another button and add that button as a subview of the main button.
 

Pulkit

macrumors newbie
Original poster
Aug 27, 2008
25
0
Or just put that image into another button and add that button as a subview of the main button.
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