I am making a word matching application in iOS in which I have two lines of words and I want to make a complete word from two labels of random words, so this is good for everyone.
Now I want to make a rectangle at runtime as an object of a draggable label, when I click on a label to drag it, the rectangle should light up the same size as the size of the word label.
How can I achieve this in objective-C?
For clarity, you can see in the image where I want to make this green rectangle at runtime to place the right side labels in it.
The left labels do not move and should always be in the rectangle, as you see in this image. Code so far i'm trying to make a rectangle as UIViewin viewDidLoadhow
for(int i = 0; i <5;i++){
customView = [[UIView alloc]initWithFrame:CGRectMake(10,y,50, 30)];
customView.backgroundColor = [UIColor greenColor];
[gameLayer addSubview:customView];
y = y+40;
}
But that is not what I really want. Any help appreciated ...
source
share