I am working for Gestrue Recognizer with many UIView for rotation, pinch and pan action in a view. My question is how to make one of my UIView bringSubviewToFront when I touched, for example, like my photo, I want green one bring to front when I touch it. (so blue change to behind of green)
each UIView are init from my NoteView class
NoteView * noteView = [[NoteView alloc]initWithFrame:CGRectMake(50, 50, 150, 150)];
[self setGesture:noteView];
[self.view addSubview:noteView];
TouchsBegan I am working like this
-(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
self.note = [NoteView new];
UITouch * touch = [touches anyObject];
if (touch.view == self.note) {
[self.view bringSubviewToFront:self.note];
}}