dblock / ARTiledImageView

Display, pan and deep zoom with tiled images on iOS.
MIT License
232 stars 36 forks source link

@dblock => fixes for animations, zoomed out centering, and opening up the double tap gesture #5

Closed orta closed 10 years ago

orta commented 10 years ago

The way to get expected behaviour when dealing with images that are not full screen width is to have a single view that holds both tiled view & backing view. I originally thought that you had to have the tiled view as the viewForZoom for tiling to work. Turns out I was wrong, in Eigen we got away with this by not allowing zooming, and Folio didn't need it because it had it's own tiler until I moved to this recently.

before before

after after

also, you may want to override the double tap gesture with a single tap so I've exposed that.

dblock commented 10 years ago

I would really like some tests for this, but I won't hold the PR, see my minor comments. For example, the's definitely a way to zoom out a view programmatically and verify that the snapshot is zoomed out vs. not.

orta commented 10 years ago

pushed fixes for every comment, and added snapshot tests. It's weird how awkward you have to handle UIScrollViews, I've never had to do this amount of hacking to do snapshots in Folio.

orta commented 10 years ago

Is probably more related to Core Animation stuff in the CATileLayer as a guess. I had a few guesses at how to do it without the UIWindow + VC dance, but didn't succeed.

dblock commented 10 years ago

Failed specs.

orta commented 10 years ago

:green_apple:

dblock commented 10 years ago

See inline comments. There're references to Artsy Folio, which should be changed to ARTiledImageView.

dblock commented 10 years ago

I am going to merge, maybe you can look through headers across the board. I think they should all say ARTiledImageView regardless of whether these files originally came from.