Skip to content

Commit

Permalink
💫 Update: ModalViewControllerMetrics
Browse files Browse the repository at this point in the history
  • Loading branch information
dominicstop committed Sep 27, 2024
1 parent 23963eb commit 7edb54f
Showing 1 changed file with 33 additions and 1 deletion.
34 changes: 33 additions & 1 deletion ios/Temp/ModalViewControllerMetrics.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ import Foundation
import DGSwiftUtilities


public struct ModalViewControllerMetrics: Encodable {
public struct ModalViewControllerMetrics: DictionaryRepresentationSynthesizing {

public var instanceID: String;

public var isBeingDismissed: Bool;
public var isBeingPresented: Bool;
Expand All @@ -25,7 +27,37 @@ public struct ModalViewControllerMetrics: Encodable {
public var modalPresentationStyle: String;
public var isUsingSheetPresentationController: Bool;

// MARK: - Init
// ------------

public init(
instanceID: String,
isBeingDismissed: Bool,
isBeingPresented: Bool,
isPresentedAsModal: Bool,
modalLevel: Int,
topmostModalLevel: Int,
isTopMostModal: Bool,
hasPanGesture: Bool,
isPanGestureEnabled: Bool,
modalPresentationStyle: String,
isUsingSheetPresentationController: Bool
) {
self.instanceID = instanceID;
self.isBeingDismissed = isBeingDismissed;
self.isBeingPresented = isBeingPresented;
self.isPresentedAsModal = isPresentedAsModal;
self.modalLevel = modalLevel;
self.topmostModalLevel = topmostModalLevel;
self.isTopMostModal = isTopMostModal;
self.hasPanGesture = hasPanGesture;
self.isPanGestureEnabled = isPanGestureEnabled;
self.modalPresentationStyle = modalPresentationStyle;
self.isUsingSheetPresentationController = isUsingSheetPresentationController;
}

public init(viewController modalVC: UIViewController){
self.instanceID = modalVC.synthesizedStringID;

self.isBeingDismissed = modalVC.isBeingDismissed
self.isBeingPresented = modalVC.isBeingPresented
Expand Down

0 comments on commit 7edb54f

Please sign in to comment.