views:

575

answers:

4

I'm kind of lost in between UIImage, UIImageView, CG, layers... I want to draw the same UIImage multiple times in the same UIImageView. I don't want to have a separate subview for each of those objects. It's enough to have a flat image. How do I do that?

A: 

UIImageView does not allow you to do that. Instead, I would recommend you to use a regular UIView and use the drawRect: function to draw the images. Take a look at the Core Graphics docs if you want to know how to do that.

Jongsma
A: 

You'll have to create multiple UIImage objects to do this. Really a UIImageView is the wrong choice. Create a UIView and just add mulitple UIImageView objects to it. Sorry.

marcc
A: 

Can u get me the sample for this answer,Marcc HI

Im currently developing an application where i have to add the text over the image at any position in the image(not subview) and the output should be the single image file with the original image and the text embedded in it,any help will be appreciable.

eg : water mark on the image

Thanks sivasankar

siva
A: 

Well I guess it is simple

[imageView addSubview:myTextView];

where myTextView can be made using the following piece of code

UIImage *myImage = [[uiimage alloc]initwithname:@"txtImage"];
UIImageView *myTextView =
      [[UIImageView alloc]initwithframe:("enter the height width you want ")];
yunas