iphone - How to draw a thought bubble in iOS -
i trying create thought bubble in ios , want fill image. have gone through lots of results returned internet search engines, did not solution.
the bubble, want create attached image below.

so want mask image in bubble. make bubble internally full black.(to use masking) , use bellow function masking.
- (uiimage*) maskimage:(uiimage *)image withmask:(uiimage *)maskimage { cgimageref maskref = maskimage.cgimage; cgimageref mask = cgimagemaskcreate(cgimagegetwidth(maskref), cgimagegetheight(maskref), cgimagegetbitspercomponent(maskref), cgimagegetbitsperpixel(maskref), cgimagegetbytesperrow(maskref), cgimagegetdataprovider(maskref), null, false); cgimageref masked = cgimagecreatewithmask([image cgimage], mask); return [uiimage imagewithcgimage:masked]; }
for more sample tutorial visit following links :-)
http://jeroendeleeuw.com/post/33638733049/how-to-mask-images-with-core-graphics-in-ios
Comments
Post a Comment