rkb
rkb

Reputation: 11231

How to draw an outline to an image in iPhone sdk

I want to draw an outline to an image. Is there any simple way to do that in iPhone sdk.

Upvotes: 0

Views: 614

Answers (3)

Naveen Thunga
Naveen Thunga

Reputation: 3675

Use this Header file and also import QuartzCore.framework framework. Your job is done.

#import "QuartzCore/QuartzCore.h"
mImage.layer.borderWidth = 2;

Upvotes: 0

Mark Bessey
Mark Bessey

Reputation: 19782

If you have limited number of images that you need to do this with, use a drawing program to create an outlined version of each image, then use setImage: on a UIImageView to display one or the other image.

If you need to draw an outline around sone arbitrary image at run time, that's a bit harder.

Upvotes: 0

Daniel
Daniel

Reputation: 22405

Besides drawing it urself on the screen you can maybe have an image of the outline and put 2 image views on top of each other to get the picture with it's outline

Upvotes: 1

Related Questions