Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/tiled/TilingScrollView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public protocol TilingScrollViewDataSource {
func sizeOfTilesInTilingScrollView(tilingScrollView: TilingScrollView) -> CGSize
}

@IBDesignable
public class TilingScrollView: UIScrollView, UIScrollViewDelegate, TilingViewDataSource {

private var pointToCenterAfterResize: CGPoint!
Expand Down Expand Up @@ -67,7 +68,8 @@ public class TilingScrollView: UIScrollView, UIScrollViewDelegate, TilingViewDat

public var imageView: TilingImageView! // hold thumbnail

var fillMode: Bool = false
@IBInspectable
public var fillMode: Bool = false
var widthIsCropped: Bool = false

var tilingEnabled: Bool = true {
Expand Down Expand Up @@ -139,9 +141,9 @@ public class TilingScrollView: UIScrollView, UIScrollViewDelegate, TilingViewDat
let zoomScale = min(maximumZoomScale, min(zoomScaleX, zoomScaleY))

if !zoomOutWhenZoomedIn || fabs(self.zoomScale - zoomScale) > fabs(self.zoomScale - minimumZoomScale) {
zoomToRect(zoomRect, animated: true)
zoomToRect(zoomRect, animated: animated)
} else {
setZoomScale(minimumZoomScale, animated: true)
setZoomScale(minimumZoomScale, animated: animated)
}
}

Expand Down