0

I have a following image on uiimageview and i want to draw a small dot on that image can somebody tell me how i can do that

enter image description here

i want to create a radar kind a view so i need to easily add a small circle and remove it after a some time i have try drawing on uiimage view but it always create a new uiimage and apply it to uiimageview is there a way to do this ?

Kamal Upasena
  • 1,329
  • 4
  • 13
  • 38

2 Answers2

0

Hope this helps:

UIImageView *smallCircle = //alloc init assign your image

[smallCircle setCenter: CGPointMake (x value, y value)]

[bigCircleImageView.superview addSubview: smallCircle];
[bigCircleImageView.superview bringSubviewToFront: smallCircle];
Mrunal
  • 13,982
  • 6
  • 52
  • 96
  • how can i add this on my current imageview i try to add this on my imageview but it dosent show this is what i do UIImage *myScreenShot = [UIImage imageNamed:@"point.png"]; UIImageView *smallCircle = [[UIImageView alloc] initWithImage:myScreenShot]; [smallCircle setCenter: CGPointMake (self.imageView.frame.origin.x,self.imageView.frame.origin.y)]; – Kamal Upasena Jan 06 '15 at 11:41
  • You require to add this as subview along with big circle image. And then bring this view on top. – Mrunal Jan 06 '15 at 14:19
0

Annoyingly you are unable to add subviews to UIImageView see here You could add both the UIImageViews to an empty view and position them correctly though.

Community
  • 1
  • 1
Cocoadelica
  • 3,006
  • 27
  • 30