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

#190 fix bug: adjust presentedView origin in PanContainerView #191

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
28 changes: 17 additions & 11 deletions PanModal/View/PanContainerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,23 @@ import UIKit
having to do those changes directly on the view
*/
class PanContainerView: UIView {

init(presentedView: UIView, frame: CGRect) {
super.init(frame: frame)
addSubview(presentedView)
}

@available(*, unavailable)
required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}

private let presentedView: UIView

init(presentedView: UIView, frame: CGRect) {
self.presentedView = presentedView
super.init(frame: frame)
addSubview(presentedView)
}

@available(*, unavailable)
required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}

override func layoutSubviews() {
super.layoutSubviews()
self.presentedView.frame.origin = .zero
}
}

extension UIView {
Expand Down