2019-11-24 05:15:29 +01:00
|
|
|
//
|
|
|
|
// CroppingPreviewParameters.swift
|
|
|
|
// NetNewsWire-iOS
|
|
|
|
//
|
|
|
|
// Created by Maurice Parker on 11/23/19.
|
|
|
|
// Copyright © 2019 Ranchero Software. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
import UIKit
|
|
|
|
|
|
|
|
class CroppingPreviewParameters: UIPreviewParameters {
|
|
|
|
|
2021-07-16 21:28:56 +02:00
|
|
|
override init() {
|
|
|
|
super.init()
|
|
|
|
}
|
|
|
|
|
2019-11-24 05:15:29 +01:00
|
|
|
init(view: UIView) {
|
|
|
|
super.init()
|
|
|
|
let newBounds = CGRect(x: 1, y: 1, width: view.bounds.width - 2, height: view.bounds.height - 2)
|
|
|
|
let visiblePath = UIBezierPath(roundedRect: newBounds, cornerRadius: 10)
|
|
|
|
self.visiblePath = visiblePath
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|