2

Right now, I have a UIScrollView which scales its UIView contents on zoom events. When I hit a certain zoomScale threshold, I want to be able to toggle on and off extra information within the UIViews. Right now, I am simply setting the hidden flag to YES/NO to accomplish this.

However, a problem occurs while attempting to get the bounds of the UIView. The bounds always returns a width and height that extends to include the invisible content.

Is there a way to limit the bounds to only return the size of visible content within a UIView?

1 Answer 1

0
  • You could derive new bounds as you zoom and not rely on the view's automatic bounds adjusting.

OR

  • If it doesn't make your code too complicated, I would remove those subviews from your resizing view instead of just hiding them.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.