I have a Label named "Lable_Match
" (in self.view)
and a UIView
(in self.view).
In that View there are 1000+ labels.
and view is move using touch move method. and When user move View and he touch end that time check view subview lable is on the "Lable_Match
" if any one lable is on this so the check text are same or not.
Asked
Active
Viewed 155 times
-1

Majid Bashir
- 558
- 1
- 4
- 27

Chirag D jinjuwadiya
- 653
- 7
- 18
-
Some People are Down vote Without giving any Reason. – Chirag D jinjuwadiya Mar 13 '15 at 13:24
-
is it a uitableview or view? how are you doing this? 1000+ in a view? that is causing ambiguity, I have not downwoted you post atleast. Please clarify, so that i may help you. – Majid Bashir Mar 13 '15 at 13:40
2 Answers
0
I believe you want to use this method: [self.view convertRect:self.label.frame fromView:self.view.subview];
from this post: How to get the frame of a view inside another view?
This will give you the adjusted position of the label form your list of 1000+ labels. You can then compare that to the label of Label_match , then compare their text
-
-
Thanks i Get position according to self.view for usgin CGRect frame = [subview convertRect:self.view.frame toView:self.view]; – Chirag D jinjuwadiya Mar 13 '15 at 13:55
0
In response to your question my question is there any way to find the location of your label. If you have the fixed location for label then you can match current taped area and the label area and find the text. Or if you have a fixed sized label you can manipulate it and able to get the label text

Anupam Gupta
- 623
- 1
- 7
- 18
-
-
-(void)moveViewWithGestureRecognizer:(UIPanGestureRecognizer *)panGestureRecognizer{ CGPoint touchLocation = [panGestureRecognizer locationInView:self.view]; } – Anupam Gupta Mar 17 '15 at 11:11
-
not only that you can easily avail the label from the gesture by below code: 'UILabel * label = (UILabel *)[panGestureRecognizer view];' – Anupam Gupta Mar 17 '15 at 11:37