Fix a specific View

Asked 2 years ago, Updated 2 years ago, 66 views

How do I fix a specific view on the screen?
For example, suppose you overlap ScrollView, ImageView, and UIView in order from the bottom.This UIView is translucent.Also, I would like to zoom in and out of ImageView when I pinch in and out of the screen.However, the translucent UIView is also scaled down. How do I zoom in and out only ImageView?
I've thought a lot about it, but I've thought about whether I can fix the UIView in case of pinch-in/out.But I looked it up, but I don't know how to do it.
If there is a way to fix a specific view, please let me know.Also, please let me know if there is a better solution than I thought.I'm sorry, but I appreciate your cooperation.

objective-c

2022-09-30 20:17

2 Answers

Why don't you turn ImageView property autoresizesSubviews to No?Or turn the UIView autoresizeMask to No.


2022-09-30 20:17

If you stop the parent-child relationship (superview and subview relationship) of the UIImageView instance and the UIView instance, zoom in only UIImageView.
I think it probably means, "No, no, it has to be a parent-child relationship," but if so, please explain the necessity in a way that makes sense.


2022-09-30 20:17

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.