Shay
Shay

Reputation: 2605

How to get UIView by a CGRect?

I have UIScrollView with alot of views. I want to identify a view by rect. How to do it?

Tnx

Upvotes: 0

Views: 347

Answers (1)

Espresso
Espresso

Reputation: 4752

for (UIView *subview in [scrollView subviews]) {
  if (subview.frame == aFrame) {
    // Do something
  }
}

Upvotes: 2

Related Questions