Reputation: 27
I find a similar question here, and when I translate my view I can solve this problem successfully, but when I rotate or scale my view, I got a incorrect result. Anyone can help me?
Upvotes: 1
Views: 196
Reputation: 6648
I found a solution for your demo, and it's been tested. You could use the code from this issue's accepted answer: Find Frame Coordinates After UIView Transform is Applied (CGAffineTransform)
Use the code above as a UIView's Category, and then get the point like:
topleft = [view newTopLeft];
topright = [view newTopRight];
bottomleft = [view newBottomLeft];
bottomright = [view newBottomRight];
Upvotes: 2