I've already found some kind of solution to the question I answered but it doesn't fix the problem I have:
(where I searched : Get position of UIView in respect to its superview's superview,
How to get the frame of a view inside another view?,
iOS - Get location of a view in a window? ...and more)
I wrote that code:
CGRect targetFrame = [self.view convertRect:self.buttonImageView.frame
fromView:self.view];
CGRect superView1Frame = [self.view convertRect:self.buttonImageView.superview.frame
fromView:self.view];
CGRect superView2Frame = [self.view convertRect:self.buttonImageView.superview.superview.frame
fromView:self.view];
targetFrame.origin.y = targetFrame.origin.y + superView1Frame.origin.y + superView2Frame.origin.y;
targetFrame.origin.x = targetFrame.origin.x + superView1Frame.origin.x + superView2Frame.origin.x;
which works well and I can get the target frame I want.
But, the fact is that code is very ugly and I'm sure there is another way to do it. I've already tried that kind of things :
CGRect targetFrame = [self.wallButtonImage.superview.superview convertRect:self.wallButtonImage.frame
fromView:self.buttonImageView.superview.superview];
return [self.wallButtonImage.superview.superview convertRect:targetFrame
fromView:self.buttonImageView.superview.superview];
But it doesn't work at all...
Question(s) : Is there a way to get the same result as I did have in my first example but using another method? Or is there simply better way to do it?
Also, I can't understand why I can't find any other solution for it, so can you please explain me what you would have done?