Making loading height configurable via init (#2567)
This commit is contained in:
parent
78b4332e5f
commit
ff6390e37f
|
@ -247,7 +247,8 @@ public class PaymentSheet {
|
|||
let loadingViewController = LoadingViewController(
|
||||
delegate: self,
|
||||
appearance: configuration.appearance,
|
||||
isTestMode: isTestMode
|
||||
isTestMode: isTestMode,
|
||||
loadingViewHeight: 244
|
||||
)
|
||||
|
||||
let vc = BottomSheetViewController(
|
||||
|
|
|
@ -42,7 +42,8 @@ internal enum SavedPaymentMethodsSheetResult {
|
|||
let loadingViewController = LoadingViewController(
|
||||
delegate: self,
|
||||
appearance: configuration.appearance,
|
||||
isTestMode: isTestMode
|
||||
isTestMode: isTestMode,
|
||||
loadingViewHeight: 180
|
||||
)
|
||||
|
||||
let vc = BottomSheetViewController(
|
||||
|
|
|
@ -35,15 +35,16 @@ class LoadingViewController: UIViewController, BottomSheetContentViewController
|
|||
func didTapOrSwipeToDismiss() {
|
||||
delegate?.shouldDismiss(self)
|
||||
}
|
||||
let loadingViewHeight: CGFloat = 244
|
||||
let loadingViewHeight: CGFloat
|
||||
var panScrollable: UIScrollView?
|
||||
let activityIndicator = UIActivityIndicatorView(style: .medium)
|
||||
weak var delegate: LoadingViewControllerDelegate?
|
||||
|
||||
init(delegate: LoadingViewControllerDelegate, appearance: PaymentSheet.Appearance, isTestMode: Bool) {
|
||||
init(delegate: LoadingViewControllerDelegate, appearance: PaymentSheet.Appearance, isTestMode: Bool, loadingViewHeight: CGFloat) {
|
||||
self.delegate = delegate
|
||||
self.appearance = appearance
|
||||
self.isTestMode = isTestMode
|
||||
self.loadingViewHeight = loadingViewHeight
|
||||
super.init(nibName: nil, bundle: nil)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue