Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jul 14, 2014

Conversation

orta
Copy link
Collaborator

@orta orta commented Jul 10, 2014

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.

@@ -0,0 +1,25 @@
//
// ARImageBackedTiledView.m
// Artsy Folio
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not Artsy Folio.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still not folio :-)

@dblock
Copy link
Owner

dblock commented Jul 10, 2014

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
Copy link
Collaborator Author

orta commented Jul 11, 2014

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
Copy link
Collaborator Author

orta commented Jul 11, 2014

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
Copy link
Owner

dblock commented Jul 11, 2014

Failed specs.

@orta
Copy link
Collaborator Author

orta commented Jul 14, 2014

🍏

@dblock
Copy link
Owner

dblock commented Jul 14, 2014

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

@@ -0,0 +1,73 @@
//
// ARTiledImageScrollViewSpec.m
// Demo
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one shouldn't be Demo either I believe, see other files in this project.

@dblock
Copy link
Owner

dblock commented Jul 14, 2014

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.

dblock added a commit that referenced this pull request Jul 14, 2014
@dblock => fixes for animations, zoomed out centering, and opening up the double tap gesture
@dblock dblock merged commit 52bf1aa into master Jul 14, 2014
@orta orta mentioned this pull request Jul 15, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants