Chandu
Chandu

Reputation: 630

iOS: At a specific coordinate, adding a UIView as subview of another UIView

I have ten (x,y) coordinates values in NSInteger array. //Yet to implement

I want to add a series (10 array) of UIView on another bigger UIView.

[self.myBiggerView addSubview:mySmallView];

I am not getting how to add mySmallView at a specific (my coordinate array) coordinate. Please help

Upvotes: 0

Views: 1080

Answers (1)

Jack
Jack

Reputation: 16855

Either after or before

[self.myBiggerView addSubview:mySmallView];

Set the frame of your small view like this:

mySmallView.frame = CGRectMake(coord1,coord2,width,height);

Upvotes: 1

Related Questions