jessedc / JCTiledScrollView

A set of classes that wrap UIScrollView and CATiledLayer. It aims to simplify displaying large images and PDFs at multiple zoom scales.
MIT License
310 stars 47 forks source link

Supports changing tile size from default 256x256 #49

Open Joohansson opened 6 years ago

Joohansson commented 6 years ago

Will allow changing tileSize from swift code and also set correct size in JCTiledLayer (or tiles will have wrong resolution on the phone). Tested with 512x512 tiles

Use like this: let scrollView = JCTiledScrollView(frame: self.view.frame, contentSize: imageSize) scrollView.tiledView.tileSize = CGSize(width: CGFloat(256.0), height: CGFloat(256.0))