Skip to content

Instantly share code, notes, and snippets.

@nyoron
nyoron / gist:363423
Created April 12, 2010 10:12
Some sample code for a horizontal paged UIScrollView with a gap between each image, like Photos.app (which looks nicer when paging).
/*
Some sample code for a horizontal paged UIScrollView with a gap between each image (which looks nicer). Note - not using contentInset, we want each page to fill the iPhone screen and the gap only to be visible when scrolling (like Photos.app).
Taking the iPhone status bar into account - our viewport is 320x460
Our UIScrollView is therefore set in Interface Builder to 340x460 with a -10 X offset (so it's larger than the viewport but still centred)
Then we do the following...
*/
// Our image filenames
@nyoron
nyoron / .gitattributes
Created February 6, 2010 11:43 — forked from program247365/.gitattributes
Git Xcode project setup
*.pbxproj -crlf -diff -merge