You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to use this button in UIScrollView.
I want to create many small UIViews and add the button to each view.
The problem is that the menu opening location is wrong.
Now the origin is calculated in row number 97 as follows:
origin = [self.superview convertPoint:self.frame.origin toView:nil];
Later you have this condition:
if (!CGPointEqualToPoint(origin,self.frame.origin)) {
selectorViewFrame.origin.x -= origin.x;
selectorViewFrame.origin.y -= origin.y;
}
I solved the problem by doing 2 things:
calculating the origin as follows:
origin = self.frame.origin;
In addition I removed the if statement.
I wonder what is the right way to calculate the origin.
Thanks,
Tom
The text was updated successfully, but these errors were encountered:
Hi,
I want to use this button in UIScrollView.
I want to create many small UIViews and add the button to each view.
The problem is that the menu opening location is wrong.
Now the origin is calculated in row number 97 as follows:
origin = [self.superview convertPoint:self.frame.origin toView:nil];
Later you have this condition:
if (!CGPointEqualToPoint(origin,self.frame.origin)) {
selectorViewFrame.origin.x -= origin.x;
selectorViewFrame.origin.y -= origin.y;
}
I solved the problem by doing 2 things:
origin = self.frame.origin;
I wonder what is the right way to calculate the origin.
Thanks,
Tom
The text was updated successfully, but these errors were encountered: