iphone - How much contentOffset changes in UIScrollview for zooming? -


In UIScrollview, when I scroll / drag, I have changed the ScrollView content which shows how many scrolls / Was dragged scrollview. In this way, I have updated the scrollviewsview for scrolling.

However, when I zoom in ScrollView (using pinch zooming), the offset of content scrollwatch also changes. I do not understand how much content offset has changed because I can not relate the changes with the zoomscale value to know the changes in the content for zooming anyway?

My intention is to get the value of the material to change while zooming (which is not because I get the material offset change due to zooming) so that I update the subview of my scrolls accordingly You can.

I got stuck in here. Any help will be very much appreciated.

Thanks

Shaykote

I have set up A small test project, and it looks like content offset is multiplied by zoomScale . So if you want to account for it, before using it, divide it with zoomScale

Perhaps it is best to describe it with a short example: I have a scrollview , And added a scene that pans around the pan and zooms a little zoom. For that scene, I've added a little red view, which I want to keep in the same situation, no matter whoever it is. I'm looking at the content offset of ScrollView, and I've implemented it like this: CGPint ContentForce = Self. Scrollviewconsetset; CGFloat zoomscackel = self.scrollView.zoomScale; Self.moveView.frame = CGRectMake ((contentOffset.x + 10) / zoomcale, (contentOffset.y + 10) / zoomscale, 10, 10);

It puts moveView in the same position on the screen, when the user zooms, then scaling.

I hope this clears one thing, but if I can do it for help, then I know.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -