开发者

How to have some subviews in UIScrollView never zoom?

开发者 https://www.devze.com 2023-03-29 16:11 出处:网络
I have a polygon view in a scrollview. When the user zooms the scrollview, the polygon is magnified, but so are the handles o开发者_Python百科n each of its vertices (when selected).

I have a polygon view in a scrollview. When the user zooms the scrollview, the polygon is magnified, but so are the handles o开发者_Python百科n each of its vertices (when selected).

How can I make sure that the handles size stay constant whatever the zoom factor?

The handles are subviews of the polygon. I would be willing to consider a different approach if that made it any simpler.

Thanks a lot

JD


how about grabbing the zoom level of your parent uiscrollview and passing it into your polygon object and applying the opposite scaling to the handles? So if you are at 200% with the uiscrollview, downsize the handles to 50%

or

you could make your polygon uiview auto resizable in width/height and manually code the zoom process responding to your uiscrollview by changing the size of your polygon, not scaling it.

0

精彩评论

暂无评论...
验证码 换一张
取 消